* NOTE: You need to set the Stata working directory to the path
* where the data file is located.
cd "/Users/gkd225/Dropbox/Complete/who_counts/EHR/EHR_replication"

*ssc install listtab,replace
*ssc install boottest, replace
*ssc install estout, replace
*ssc install gr0002_3., replace
*ssc install carryforward, replace
*ssc install reghdfe, replace
*ssc install ftools,replace
*ssc install parmest, replace
*ssc install extremes, replace
*ssc install cibar, replace
*ssc install coefplot, replace
*ssc install honestdid, replace

* settings and graphics
clear
eststo clear
set scheme lean2 
set more off
{
clear
quietly infix                        ///
  int     country           1-3      ///
  int     year              4-7      ///
  double  sample            8-16     ///
  double  serial            17-28    ///
  int     persons           29-32    ///
  double  hhwt              33-40    ///
  long    geo1alt_ma        41-46    ///
  int     geo1_ma1994       47-49    ///
  double  geo2alt_ma        50-58    ///
  long    geo2_ma1994       59-64    ///
  byte    hhtype            65-66    ///
  byte    nfams             67-67    ///
  byte    ncouples          68-68    ///
  byte    nmothers          69-69    ///
  byte    nfathers          70-70    ///
  int     headloc           71-73    ///
  byte    ma1994a_dwelltyp  74-75    ///
  int     pernum            76-79    ///
  double  perwt             80-87    ///
  int     momloc            88-90    ///
  int     poploc            91-93    ///
  int     sploc             94-96    ///
  byte    parrule           97-98    ///
  byte    sprule            99-100   ///
  int     famunit           101-104  ///
  int     famsize           105-108  ///
  byte    nchild            109-110  ///
  byte    eldch             111-112  ///
  byte    relate            113-113  ///
  int     related           114-117  ///
  int     age               118-120  ///
  byte    age2              121-122  ///
  byte    sex               123-123  ///
  byte    marst             124-124  ///
  int     marstd            125-127  ///
  int     birthyr           128-131  ///
  byte    birthmo           132-133  ///
  byte    nativity          134-134  ///
  byte    citizen           135-135  ///
  byte    lit               136-136  ///
  byte    edattain          137-137  ///
  int     edattaind         138-140  ///
  byte    yrschool          141-142  ///
  int     educma            143-145  ///
  byte    migyrs1           146-147  ///
  byte    ma1994a_resident  148-148  ///
  byte    ma1994a_vitalreg  149-149  ///
  byte    ma1994a_bpl       150-150  ///
  byte    ma1994a_prevres   151-151  ///
  byte    ma1994a_durres    152-153  ///
  byte    ma1994a_lit       154-154  ///
  byte    ma1994a_edlevel   155-156  ///
  byte    ma1994a_lang      157-157  ///
  using `"${clean}/ipumsi_00091.dat"'

replace hhwt             = hhwt             / 100
replace perwt            = perwt            / 100

format sample           %9.0f
format serial           %12.0f
format hhwt             %8.2f
format geo2alt_ma       %9.0f
format perwt            %8.2f

label var country          `"Country"'
label var year             `"Year"'
label var sample           `"IPUMS sample identifier"'
label var serial           `"Household serial number"'
label var persons          `"Number of person records in the household"'
label var hhwt             `"Household weight"'
label var geo1alt_ma       `"Morocco, Region 1982 - 2004 [Level 1; consistent boundaries, GIS]"'
label var geo1_ma1994      `"Morocco, Region 1994 [Level 1, GIS]"'
label var geo2alt_ma       `"Morocco, Province 1982 - 2004 [Level 2; consistent boundaries, GIS]"'
label var geo2_ma1994      `"Morocco, Province 1994 [Level 2, GIS]"'
label var hhtype           `"Household classification"'
label var nfams            `"Number of families in household"'
label var ncouples         `"Number of married couples in household"'
label var nmothers         `"Number of mothers in household"'
label var nfathers         `"Number of fathers in household"'
label var headloc          `"Head's location in household"'
label var ma1994a_dwelltyp `"Type of dwelling unit"'
label var pernum           `"Person number"'
label var perwt            `"Person weight"'
label var momloc           `"Mother's location in household"'
label var poploc           `"Father's location in household"'
label var sploc            `"Spouse's location in household"'
label var parrule          `"Rule for linking parent"'
label var sprule           `"Rule for linking spouse"'
label var famunit          `"Family unit membership"'
label var famsize          `"Number of own family members in household"'
label var nchild           `"Number of own children in household"'
label var eldch            `"Age of eldest own child in household"'
label var relate           `"Relationship to household head [general version]"'
label var related          `"Relationship to household head [detailed version]"'
label var age              `"Age"'
label var age2             `"Age, grouped into intervals"'
label var sex              `"Sex"'
label var marst            `"Marital status [general version]"'
label var marstd           `"Marital status [detailed version]"'
label var birthyr          `"Year of birth"'
label var birthmo          `"Month of birth"'
label var nativity         `"Nativity status"'
label var citizen          `"Citizenship"'
label var lit              `"Literacy"'
label var edattain         `"Educational attainment, international recode [general version]"'
label var edattaind        `"Educational attainment, international recode [detailed version]"'
label var yrschool         `"Years of schooling"'
label var educma           `"Educational attainment, Morocco"'
label var migyrs1          `"Years residing in current locality"'
label var ma1994a_resident `"Residence status"'
label var ma1994a_vitalreg `"Vital registration"'
label var ma1994a_bpl      `"Place of birth "'
label var ma1994a_prevres  `"Place of previous residence"'
label var ma1994a_durres   `"Duration of residence (in current town/village)"'
label var ma1994a_lit      `"Literacy"'
label var ma1994a_edlevel  `"Level of education / last grade completed (detailed)"'
label var ma1994a_lang     `"Dialect (local language)"'

label define country_lbl 032 `"Argentina"'
label define country_lbl 051 `"Armenia"', add
label define country_lbl 040 `"Austria"', add
label define country_lbl 050 `"Bangladesh"', add
label define country_lbl 112 `"Belarus"', add
label define country_lbl 204 `"Benin"', add
label define country_lbl 068 `"Bolivia"', add
label define country_lbl 072 `"Botswana"', add
label define country_lbl 076 `"Brazil"', add
label define country_lbl 854 `"Burkina Faso"', add
label define country_lbl 116 `"Cambodia"', add
label define country_lbl 120 `"Cameroon"', add
label define country_lbl 124 `"Canada"', add
label define country_lbl 152 `"Chile"', add
label define country_lbl 156 `"China"', add
label define country_lbl 170 `"Colombia"', add
label define country_lbl 188 `"Costa Rica"', add
label define country_lbl 192 `"Cuba"', add
label define country_lbl 208 `"Denmark"', add
label define country_lbl 214 `"Dominican Republic"', add
label define country_lbl 218 `"Ecuador"', add
label define country_lbl 818 `"Egypt"', add
label define country_lbl 222 `"El Salvador"', add
label define country_lbl 231 `"Ethiopia"', add
label define country_lbl 242 `"Fiji"', add
label define country_lbl 246 `"Finland"', add
label define country_lbl 250 `"France"', add
label define country_lbl 276 `"Germany"', add
label define country_lbl 288 `"Ghana"', add
label define country_lbl 300 `"Greece"', add
label define country_lbl 320 `"Guatemala"', add
label define country_lbl 324 `"Guinea"', add
label define country_lbl 332 `"Haiti"', add
label define country_lbl 340 `"Honduras"', add
label define country_lbl 348 `"Hungary"', add
label define country_lbl 352 `"Iceland"', add
label define country_lbl 356 `"India"', add
label define country_lbl 360 `"Indonesia"', add
label define country_lbl 364 `"Iran"', add
label define country_lbl 368 `"Iraq"', add
label define country_lbl 372 `"Ireland"', add
label define country_lbl 376 `"Israel"', add
label define country_lbl 380 `"Italy"', add
label define country_lbl 388 `"Jamaica"', add
label define country_lbl 400 `"Jordan"', add
label define country_lbl 404 `"Kenya"', add
label define country_lbl 417 `"Kyrgyz Republic"', add
label define country_lbl 418 `"Laos"', add
label define country_lbl 426 `"Lesotho"', add
label define country_lbl 430 `"Liberia"', add
label define country_lbl 454 `"Malawi"', add
label define country_lbl 458 `"Malaysia"', add
label define country_lbl 466 `"Mali"', add
label define country_lbl 480 `"Mauritius"', add
label define country_lbl 484 `"Mexico"', add
label define country_lbl 496 `"Mongolia"', add
label define country_lbl 504 `"Morocco"', add
label define country_lbl 508 `"Mozambique"', add
label define country_lbl 104 `"Myanmar"', add
label define country_lbl 524 `"Nepal"', add
label define country_lbl 528 `"Netherlands"', add
label define country_lbl 558 `"Nicaragua"', add
label define country_lbl 566 `"Nigeria"', add
label define country_lbl 578 `"Norway"', add
label define country_lbl 586 `"Pakistan"', add
label define country_lbl 275 `"Palestine"', add
label define country_lbl 591 `"Panama"', add
label define country_lbl 598 `"Papua New Guinea"', add
label define country_lbl 600 `"Paraguay"', add
label define country_lbl 604 `"Peru"', add
label define country_lbl 608 `"Philippines"', add
label define country_lbl 616 `"Poland"', add
label define country_lbl 620 `"Portugal"', add
label define country_lbl 630 `"Puerto Rico"', add
label define country_lbl 642 `"Romania"', add
label define country_lbl 643 `"Russia"', add
label define country_lbl 646 `"Rwanda"', add
label define country_lbl 662 `"Saint Lucia"', add
label define country_lbl 686 `"Senegal"', add
label define country_lbl 694 `"Sierra Leone"', add
label define country_lbl 703 `"Slovak Republic"', add
label define country_lbl 705 `"Slovenia"', add
label define country_lbl 710 `"South Africa"', add
label define country_lbl 728 `"South Sudan"', add
label define country_lbl 724 `"Spain"', add
label define country_lbl 729 `"Sudan"', add
label define country_lbl 740 `"Suriname"', add
label define country_lbl 752 `"Sweden"', add
label define country_lbl 756 `"Switzerland"', add
label define country_lbl 834 `"Tanzania"', add
label define country_lbl 764 `"Thailand"', add
label define country_lbl 768 `"Togo"', add
label define country_lbl 780 `"Trinidad and Tobago"', add
label define country_lbl 792 `"Turkey"', add
label define country_lbl 800 `"Uganda"', add
label define country_lbl 804 `"Ukraine"', add
label define country_lbl 826 `"United Kingdom"', add
label define country_lbl 840 `"United States"', add
label define country_lbl 858 `"Uruguay"', add
label define country_lbl 862 `"Venezuela"', add
label define country_lbl 704 `"Vietnam"', add
label define country_lbl 894 `"Zambia"', add
label define country_lbl 716 `"Zimbabwe"', add
label values country country_lbl

label define year_lbl 1703 `"1703"'
label define year_lbl 1729 `"1729"', add
label define year_lbl 1787 `"1787"', add
label define year_lbl 1801 `"1801"', add
label define year_lbl 1819 `"1819"', add
label define year_lbl 1848 `"1848"', add
label define year_lbl 1850 `"1850"', add
label define year_lbl 1851 `"1851"', add
label define year_lbl 1852 `"1852"', add
label define year_lbl 1860 `"1860"', add
label define year_lbl 1861 `"1861"', add
label define year_lbl 1865 `"1865"', add
label define year_lbl 1868 `"1868"', add
label define year_lbl 1870 `"1870"', add
label define year_lbl 1871 `"1871"', add
label define year_lbl 1875 `"1875"', add
label define year_lbl 1880 `"1880"', add
label define year_lbl 1881 `"1881"', add
label define year_lbl 1890 `"1890"', add
label define year_lbl 1891 `"1891"', add
label define year_lbl 1900 `"1900"', add
label define year_lbl 1901 `"1901"', add
label define year_lbl 1910 `"1910"', add
label define year_lbl 1911 `"1911"', add
label define year_lbl 1960 `"1960"', add
label define year_lbl 1961 `"1961"', add
label define year_lbl 1962 `"1962"', add
label define year_lbl 1963 `"1963"', add
label define year_lbl 1964 `"1964"', add
label define year_lbl 1966 `"1966"', add
label define year_lbl 1968 `"1968"', add
label define year_lbl 1969 `"1969"', add
label define year_lbl 1970 `"1970"', add
label define year_lbl 1971 `"1971"', add
label define year_lbl 1972 `"1972"', add
label define year_lbl 1973 `"1973"', add
label define year_lbl 1974 `"1974"', add
label define year_lbl 1975 `"1975"', add
label define year_lbl 1976 `"1976"', add
label define year_lbl 1977 `"1977"', add
label define year_lbl 1978 `"1978"', add
label define year_lbl 1979 `"1979"', add
label define year_lbl 1980 `"1980"', add
label define year_lbl 1981 `"1981"', add
label define year_lbl 1982 `"1982"', add
label define year_lbl 1983 `"1983"', add
label define year_lbl 1984 `"1984"', add
label define year_lbl 1985 `"1985"', add
label define year_lbl 1986 `"1986"', add
label define year_lbl 1987 `"1987"', add
label define year_lbl 1989 `"1989"', add
label define year_lbl 1990 `"1990"', add
label define year_lbl 1991 `"1991"', add
label define year_lbl 1992 `"1992"', add
label define year_lbl 1993 `"1993"', add
label define year_lbl 1994 `"1994"', add
label define year_lbl 1995 `"1995"', add
label define year_lbl 1996 `"1996"', add
label define year_lbl 1997 `"1997"', add
label define year_lbl 1998 `"1998"', add
label define year_lbl 1999 `"1999"', add
label define year_lbl 2000 `"2000"', add
label define year_lbl 2001 `"2001"', add
label define year_lbl 2002 `"2002"', add
label define year_lbl 2003 `"2003"', add
label define year_lbl 2004 `"2004"', add
label define year_lbl 2005 `"2005"', add
label define year_lbl 2006 `"2006"', add
label define year_lbl 2007 `"2007"', add
label define year_lbl 2008 `"2008"', add
label define year_lbl 2009 `"2009"', add
label define year_lbl 2010 `"2010"', add
label define year_lbl 2011 `"2011"', add
label define year_lbl 2012 `"2012"', add
label define year_lbl 2013 `"2013"', add
label define year_lbl 2014 `"2014"', add
label define year_lbl 2015 `"2015"', add
label define year_lbl 2016 `"2016"', add
label define year_lbl 2017 `"2017"', add
label define year_lbl 2018 `"2018"', add
label define year_lbl 2019 `"2019"', add
label define year_lbl 2020 `"2020"', add
label values year year_lbl

label define sample_lbl 032197001 `"Argentina 1970"'
label define sample_lbl 032198001 `"Argentina 1980"', add
label define sample_lbl 032199101 `"Argentina 1991"', add
label define sample_lbl 032200101 `"Argentina 2001"', add
label define sample_lbl 032201001 `"Argentina 2010"', add
label define sample_lbl 051200101 `"Armenia 2001"', add
label define sample_lbl 051201101 `"Armenia 2011"', add
label define sample_lbl 040197101 `"Austria 1971"', add
label define sample_lbl 040198101 `"Austria 1981"', add
label define sample_lbl 040199101 `"Austria 1991"', add
label define sample_lbl 040200101 `"Austria 2001"', add
label define sample_lbl 040201101 `"Austria 2011"', add
label define sample_lbl 050199101 `"Bangladesh 1991"', add
label define sample_lbl 050200101 `"Bangladesh 2001"', add
label define sample_lbl 050201101 `"Bangladesh 2011"', add
label define sample_lbl 112199901 `"Belarus 1999"', add
label define sample_lbl 112200901 `"Belarus 2009"', add
label define sample_lbl 204197901 `"Benin 1979"', add
label define sample_lbl 204199201 `"Benin 1992"', add
label define sample_lbl 204200201 `"Benin 2002"', add
label define sample_lbl 204201301 `"Benin 2013"', add
label define sample_lbl 068197601 `"Bolivia 1976"', add
label define sample_lbl 068199201 `"Bolivia 1992"', add
label define sample_lbl 068200101 `"Bolivia 2001"', add
label define sample_lbl 068201201 `"Bolivia 2012"', add
label define sample_lbl 072198101 `"Botswana 1981"', add
label define sample_lbl 072199101 `"Botswana 1991"', add
label define sample_lbl 072200101 `"Botswana 2001"', add
label define sample_lbl 072201101 `"Botswana 2011"', add
label define sample_lbl 076196001 `"Brazil 1960"', add
label define sample_lbl 076197001 `"Brazil 1970"', add
label define sample_lbl 076198001 `"Brazil 1980"', add
label define sample_lbl 076199101 `"Brazil 1991"', add
label define sample_lbl 076200001 `"Brazil 2000"', add
label define sample_lbl 076201001 `"Brazil 2010"', add
label define sample_lbl 854198501 `"Burkina Faso 1985"', add
label define sample_lbl 854199601 `"Burkina Faso 1996"', add
label define sample_lbl 854200601 `"Burkina Faso 2006"', add
label define sample_lbl 116199801 `"Cambodia 1998"', add
label define sample_lbl 116200401 `"Cambodia 2004"', add
label define sample_lbl 116200801 `"Cambodia 2008"', add
label define sample_lbl 116201301 `"Cambodia 2013"', add
label define sample_lbl 120197601 `"Cameroon 1976"', add
label define sample_lbl 120198701 `"Cameroon 1987"', add
label define sample_lbl 120200501 `"Cameroon 2005"', add
label define sample_lbl 124185201 `"Canada 1852"', add
label define sample_lbl 124187101 `"Canada 1871"', add
label define sample_lbl 124188101 `"Canada 1881"', add
label define sample_lbl 124189101 `"Canada 1891"', add
label define sample_lbl 124190101 `"Canada 1901"', add
label define sample_lbl 124191101 `"Canada 1911"', add
label define sample_lbl 124197101 `"Canada 1971"', add
label define sample_lbl 124198101 `"Canada 1981"', add
label define sample_lbl 124199101 `"Canada 1991"', add
label define sample_lbl 124200101 `"Canada 2001"', add
label define sample_lbl 124201101 `"Canada 2011"', add
label define sample_lbl 152196001 `"Chile 1960"', add
label define sample_lbl 152197001 `"Chile 1970"', add
label define sample_lbl 152198201 `"Chile 1982"', add
label define sample_lbl 152199201 `"Chile 1992"', add
label define sample_lbl 152200201 `"Chile 2002"', add
label define sample_lbl 152201701 `"Chile 2017"', add
label define sample_lbl 156198201 `"China 1982"', add
label define sample_lbl 156199001 `"China 1990"', add
label define sample_lbl 156200001 `"China 2000"', add
label define sample_lbl 170196401 `"Colombia 1964"', add
label define sample_lbl 170197301 `"Colombia 1973"', add
label define sample_lbl 170198501 `"Colombia 1985"', add
label define sample_lbl 170199301 `"Colombia 1993"', add
label define sample_lbl 170200501 `"Colombia 2005"', add
label define sample_lbl 188196301 `"Costa Rica 1963"', add
label define sample_lbl 188197301 `"Costa Rica 1973"', add
label define sample_lbl 188198401 `"Costa Rica 1984"', add
label define sample_lbl 188200001 `"Costa Rica 2000"', add
label define sample_lbl 188201101 `"Costa Rica 2011"', add
label define sample_lbl 192200201 `"Cuba 2002"', add
label define sample_lbl 192201201 `"Cuba 2012"', add
label define sample_lbl 208178701 `"Denmark 1787"', add
label define sample_lbl 208180101 `"Denmark 1801"', add
label define sample_lbl 214196001 `"Dominican Republic 1960"', add
label define sample_lbl 214197001 `"Dominican Republic 1970"', add
label define sample_lbl 214198101 `"Dominican Republic 1981"', add
label define sample_lbl 214200201 `"Dominican Republic 2002"', add
label define sample_lbl 214201001 `"Dominican Republic 2010"', add
label define sample_lbl 218196201 `"Ecuador 1962"', add
label define sample_lbl 218197401 `"Ecuador 1974"', add
label define sample_lbl 218198201 `"Ecuador 1982"', add
label define sample_lbl 218199001 `"Ecuador 1990"', add
label define sample_lbl 218200101 `"Ecuador 2001"', add
label define sample_lbl 218201001 `"Ecuador 2010"', add
label define sample_lbl 818184801 `"Egypt 1848"', add
label define sample_lbl 818186801 `"Egypt 1868"', add
label define sample_lbl 818198601 `"Egypt 1986"', add
label define sample_lbl 818199601 `"Egypt 1996"', add
label define sample_lbl 818200601 `"Egypt 2006"', add
label define sample_lbl 222199201 `"El Salvador 1992"', add
label define sample_lbl 222200701 `"El Salvador 2007"', add
label define sample_lbl 231198401 `"Ethiopia 1984"', add
label define sample_lbl 231199401 `"Ethiopia 1994"', add
label define sample_lbl 231200701 `"Ethiopia 2007"', add
label define sample_lbl 242196601 `"Fiji 1966"', add
label define sample_lbl 242197601 `"Fiji 1976"', add
label define sample_lbl 242198601 `"Fiji 1986"', add
label define sample_lbl 242199601 `"Fiji 1996"', add
label define sample_lbl 242200701 `"Fiji 2007"', add
label define sample_lbl 242201401 `"Fiji 2014"', add
label define sample_lbl 246201001 `"Finland 2010"', add
label define sample_lbl 250196201 `"France 1962"', add
label define sample_lbl 250196801 `"France 1968"', add
label define sample_lbl 250197501 `"France 1975"', add
label define sample_lbl 250198201 `"France 1982"', add
label define sample_lbl 250199001 `"France 1990"', add
label define sample_lbl 250199901 `"France 1999"', add
label define sample_lbl 250200601 `"France 2006"', add
label define sample_lbl 250201101 `"France 2011"', add
label define sample_lbl 276181901 `"Germany 1819 (Mecklenburg)"', add
label define sample_lbl 276197001 `"Germany 1970 (West)"', add
label define sample_lbl 276197101 `"Germany 1971 (East)"', add
label define sample_lbl 276198101 `"Germany 1981 (East)"', add
label define sample_lbl 276198701 `"Germany 1987 (West)"', add
label define sample_lbl 288198401 `"Ghana 1984"', add
label define sample_lbl 288200001 `"Ghana 2000"', add
label define sample_lbl 288201001 `"Ghana 2010"', add
label define sample_lbl 300197101 `"Greece 1971"', add
label define sample_lbl 300198101 `"Greece 1981"', add
label define sample_lbl 300199101 `"Greece 1991"', add
label define sample_lbl 300200101 `"Greece 2001"', add
label define sample_lbl 300201101 `"Greece 2011"', add
label define sample_lbl 320196401 `"Guatemala 1964"', add
label define sample_lbl 320197301 `"Guatemala 1973"', add
label define sample_lbl 320198101 `"Guatemala 1981"', add
label define sample_lbl 320199401 `"Guatemala 1994"', add
label define sample_lbl 320200201 `"Guatemala 2002"', add
label define sample_lbl 324198301 `"Guinea 1983"', add
label define sample_lbl 324199601 `"Guinea 1996"', add
label define sample_lbl 324201401 `"Guinea 2014"', add
label define sample_lbl 332197101 `"Haiti 1971"', add
label define sample_lbl 332198201 `"Haiti 1982"', add
label define sample_lbl 332200301 `"Haiti 2003"', add
label define sample_lbl 340196101 `"Honduras 1961"', add
label define sample_lbl 340197401 `"Honduras 1974"', add
label define sample_lbl 340198801 `"Honduras 1988"', add
label define sample_lbl 340200101 `"Honduras 2001"', add
label define sample_lbl 348197001 `"Hungary 1970"', add
label define sample_lbl 348198001 `"Hungary 1980"', add
label define sample_lbl 348199001 `"Hungary 1990"', add
label define sample_lbl 348200101 `"Hungary 2001"', add
label define sample_lbl 348201101 `"Hungary 2011"', add
label define sample_lbl 352170301 `"Iceland 1703"', add
label define sample_lbl 352172901 `"Iceland 1729"', add
label define sample_lbl 352180101 `"Iceland 1801"', add
label define sample_lbl 352190101 `"Iceland 1901"', add
label define sample_lbl 352191001 `"Iceland 1910"', add
label define sample_lbl 356198341 `"India 1983"', add
label define sample_lbl 356198741 `"India 1987"', add
label define sample_lbl 356199341 `"India 1993"', add
label define sample_lbl 356199941 `"India 1999"', add
label define sample_lbl 356200441 `"India 2004"', add
label define sample_lbl 356200941 `"India 2009"', add
label define sample_lbl 360197101 `"Indonesia 1971"', add
label define sample_lbl 360197601 `"Indonesia 1976"', add
label define sample_lbl 360198001 `"Indonesia 1980"', add
label define sample_lbl 360198501 `"Indonesia 1985"', add
label define sample_lbl 360199001 `"Indonesia 1990"', add
label define sample_lbl 360199501 `"Indonesia 1995"', add
label define sample_lbl 360200001 `"Indonesia 2000"', add
label define sample_lbl 360200501 `"Indonesia 2005"', add
label define sample_lbl 360201001 `"Indonesia 2010"', add
label define sample_lbl 364200601 `"Iran 2006"', add
label define sample_lbl 364201101 `"Iran 2011"', add
label define sample_lbl 368199701 `"Iraq 1997"', add
label define sample_lbl 372190101 `"Ireland 1901"', add
label define sample_lbl 372191101 `"Ireland 1911"', add
label define sample_lbl 372197101 `"Ireland 1971"', add
label define sample_lbl 372197901 `"Ireland 1979"', add
label define sample_lbl 372198101 `"Ireland 1981"', add
label define sample_lbl 372198601 `"Ireland 1986"', add
label define sample_lbl 372199101 `"Ireland 1991"', add
label define sample_lbl 372199601 `"Ireland 1996"', add
label define sample_lbl 372200201 `"Ireland 2002"', add
label define sample_lbl 372200601 `"Ireland 2006"', add
label define sample_lbl 372201101 `"Ireland 2011"', add
label define sample_lbl 372201601 `"Ireland 2016"', add
label define sample_lbl 376197201 `"Israel 1972"', add
label define sample_lbl 376198301 `"Israel 1983"', add
label define sample_lbl 376199501 `"Israel 1995"', add
label define sample_lbl 376200801 `"Israel 2008"', add
label define sample_lbl 380200101 `"Italy 2001"', add
label define sample_lbl 380201101 `"Italy 2011"', add
label define sample_lbl 380201121 `"Italy 2011 Q1 LFS"', add
label define sample_lbl 380201221 `"Italy 2012 Q1 LFS"', add
label define sample_lbl 380201321 `"Italy 2013 Q1 LFS"', add
label define sample_lbl 380201421 `"Italy 2014 Q1 LFS"', add
label define sample_lbl 380201521 `"Italy 2015 Q1 LFS"', add
label define sample_lbl 380201621 `"Italy 2016 Q1 LFS"', add
label define sample_lbl 380201721 `"Italy 2017 Q1 LFS"', add
label define sample_lbl 380201821 `"Italy 2018 Q1 LFS"', add
label define sample_lbl 380201921 `"Italy 2019 Q1 LFS"', add
label define sample_lbl 380202021 `"Italy 2020 Q1 LFS"', add
label define sample_lbl 388198201 `"Jamaica 1982"', add
label define sample_lbl 388199101 `"Jamaica 1991"', add
label define sample_lbl 388200101 `"Jamaica 2001"', add
label define sample_lbl 400200401 `"Jordan 2004"', add
label define sample_lbl 404196901 `"Kenya 1969"', add
label define sample_lbl 404197901 `"Kenya 1979"', add
label define sample_lbl 404198901 `"Kenya 1989"', add
label define sample_lbl 404199901 `"Kenya 1999"', add
label define sample_lbl 404200901 `"Kenya 2009"', add
label define sample_lbl 417199901 `"Kyrgyz Republic 1999"', add
label define sample_lbl 417200901 `"Kyrgyz Republic 2009"', add
label define sample_lbl 418200501 `"Laos 2005"', add
label define sample_lbl 426199601 `"Lesotho 1996"', add
label define sample_lbl 426200601 `"Lesotho 2006"', add
label define sample_lbl 430197401 `"Liberia 1974"', add
label define sample_lbl 430200801 `"Liberia 2008"', add
label define sample_lbl 454198701 `"Malawi 1987"', add
label define sample_lbl 454199801 `"Malawi 1998"', add
label define sample_lbl 454200801 `"Malawi 2008"', add
label define sample_lbl 458197001 `"Malaysia 1970"', add
label define sample_lbl 458198001 `"Malaysia 1980"', add
label define sample_lbl 458199101 `"Malaysia 1991"', add
label define sample_lbl 458200001 `"Malaysia 2000"', add
label define sample_lbl 466198701 `"Mali 1987"', add
label define sample_lbl 466199801 `"Mali 1998"', add
label define sample_lbl 466200901 `"Mali 2009"', add
label define sample_lbl 480199001 `"Mauritius 1990"', add
label define sample_lbl 480200001 `"Mauritius 2000"', add
label define sample_lbl 480201101 `"Mauritius 2011"', add
label define sample_lbl 484196001 `"Mexico 1960"', add
label define sample_lbl 484197001 `"Mexico 1970"', add
label define sample_lbl 484199001 `"Mexico 1990"', add
label define sample_lbl 484199501 `"Mexico 1995"', add
label define sample_lbl 484200001 `"Mexico 2000"', add
label define sample_lbl 484200501 `"Mexico 2005"', add
label define sample_lbl 484201001 `"Mexico 2010"', add
label define sample_lbl 484201501 `"Mexico 2015"', add
label define sample_lbl 484200521 `"Mexico 2005 Q1 LFS"', add
label define sample_lbl 484200522 `"Mexico 2005 Q2 LFS"', add
label define sample_lbl 484200523 `"Mexico 2005 Q3 LFS"', add
label define sample_lbl 484200524 `"Mexico 2005 Q4 LFS"', add
label define sample_lbl 484200621 `"Mexico 2006 Q1 LFS"', add
label define sample_lbl 484200622 `"Mexico 2006 Q2 LFS"', add
label define sample_lbl 484200623 `"Mexico 2006 Q3 LFS"', add
label define sample_lbl 484200624 `"Mexico 2006 Q4 LFS"', add
label define sample_lbl 484200721 `"Mexico 2007 Q1 LFS"', add
label define sample_lbl 484200722 `"Mexico 2007 Q2 LFS"', add
label define sample_lbl 484200723 `"Mexico 2007 Q3 LFS"', add
label define sample_lbl 484200724 `"Mexico 2007 Q4 LFS"', add
label define sample_lbl 484200821 `"Mexico 2008 Q1 LFS"', add
label define sample_lbl 484200822 `"Mexico 2008 Q2 LFS"', add
label define sample_lbl 484200823 `"Mexico 2008 Q3 LFS"', add
label define sample_lbl 484200824 `"Mexico 2008 Q4 LFS"', add
label define sample_lbl 484200921 `"Mexico 2009 Q1 LFS"', add
label define sample_lbl 484200922 `"Mexico 2009 Q2 LFS"', add
label define sample_lbl 484200923 `"Mexico 2009 Q3 LFS"', add
label define sample_lbl 484200924 `"Mexico 2009 Q4 LFS"', add
label define sample_lbl 484201021 `"Mexico 2010 Q1 LFS"', add
label define sample_lbl 484201022 `"Mexico 2010 Q2 LFS"', add
label define sample_lbl 484201023 `"Mexico 2010 Q3 LFS"', add
label define sample_lbl 484201024 `"Mexico 2010 Q4 LFS"', add
label define sample_lbl 484201121 `"Mexico 2011 Q1 LFS"', add
label define sample_lbl 484201122 `"Mexico 2011 Q2 LFS"', add
label define sample_lbl 484201123 `"Mexico 2011 Q3 LFS"', add
label define sample_lbl 484201124 `"Mexico 2011 Q4 LFS"', add
label define sample_lbl 484201221 `"Mexico 2012 Q1 LFS"', add
label define sample_lbl 484201222 `"Mexico 2012 Q2 LFS"', add
label define sample_lbl 484201223 `"Mexico 2012 Q3 LFS"', add
label define sample_lbl 484201224 `"Mexico 2012 Q4 LFS"', add
label define sample_lbl 484201321 `"Mexico 2013 Q1 LFS"', add
label define sample_lbl 484201322 `"Mexico 2013 Q2 LFS"', add
label define sample_lbl 484201323 `"Mexico 2013 Q3 LFS"', add
label define sample_lbl 484201324 `"Mexico 2013 Q4 LFS"', add
label define sample_lbl 484201421 `"Mexico 2014 Q1 LFS"', add
label define sample_lbl 484201422 `"Mexico 2014 Q2 LFS"', add
label define sample_lbl 484201423 `"Mexico 2014 Q3 LFS"', add
label define sample_lbl 484201424 `"Mexico 2014 Q4 LFS"', add
label define sample_lbl 484201521 `"Mexico 2015 Q1 LFS"', add
label define sample_lbl 484201522 `"Mexico 2015 Q2 LFS"', add
label define sample_lbl 484201523 `"Mexico 2015 Q3 LFS"', add
label define sample_lbl 484201524 `"Mexico 2015 Q4 LFS"', add
label define sample_lbl 484201621 `"Mexico 2016 Q1 LFS"', add
label define sample_lbl 484201622 `"Mexico 2016 Q2 LFS"', add
label define sample_lbl 484201623 `"Mexico 2016 Q3 LFS"', add
label define sample_lbl 484201624 `"Mexico 2016 Q4 LFS"', add
label define sample_lbl 484201721 `"Mexico 2017 Q1 LFS"', add
label define sample_lbl 484201722 `"Mexico 2017 Q2 LFS"', add
label define sample_lbl 484201723 `"Mexico 2017 Q3 LFS"', add
label define sample_lbl 484201724 `"Mexico 2017 Q4 LFS"', add
label define sample_lbl 484201821 `"Mexico 2018 Q1 LFS"', add
label define sample_lbl 484201822 `"Mexico 2018 Q2 LFS"', add
label define sample_lbl 484201823 `"Mexico 2018 Q3 LFS"', add
label define sample_lbl 484201824 `"Mexico 2018 Q4 LFS"', add
label define sample_lbl 484201921 `"Mexico 2019 Q1 LFS"', add
label define sample_lbl 484201922 `"Mexico 2019 Q2 LFS"', add
label define sample_lbl 484201923 `"Mexico 2019 Q3 LFS"', add
label define sample_lbl 484201924 `"Mexico 2019 Q4 LFS"', add
label define sample_lbl 484202021 `"Mexico 2020 Q1 LFS"', add
label define sample_lbl 484202023 `"Mexico 2020 Q3 LFS"', add
label define sample_lbl 496198901 `"Mongolia 1989"', add
label define sample_lbl 496200001 `"Mongolia 2000"', add
label define sample_lbl 504198201 `"Morocco 1982"', add
label define sample_lbl 504199401 `"Morocco 1994"', add
label define sample_lbl 504200401 `"Morocco 2004"', add
label define sample_lbl 504201401 `"Morocco 2014"', add
label define sample_lbl 508199701 `"Mozambique 1997"', add
label define sample_lbl 508200701 `"Mozambique 2007"', add
label define sample_lbl 104201401 `"Myanmar 2014"', add
label define sample_lbl 524200101 `"Nepal 2001"', add
label define sample_lbl 524201101 `"Nepal 2011"', add
label define sample_lbl 528196001 `"Netherlands 1960"', add
label define sample_lbl 528197101 `"Netherlands 1971"', add
label define sample_lbl 528200101 `"Netherlands 2001"', add
label define sample_lbl 528201101 `"Netherlands 2011"', add
label define sample_lbl 558197101 `"Nicaragua 1971"', add
label define sample_lbl 558199501 `"Nicaragua 1995"', add
label define sample_lbl 558200501 `"Nicaragua 2005"', add
label define sample_lbl 566200621 `"Nigeria 2006"', add
label define sample_lbl 566200721 `"Nigeria 2007"', add
label define sample_lbl 566200821 `"Nigeria 2008"', add
label define sample_lbl 566200921 `"Nigeria 2009"', add
label define sample_lbl 566201021 `"Nigeria 2010"', add
label define sample_lbl 578180101 `"Norway 1801"', add
label define sample_lbl 578186501 `"Norway 1865"', add
label define sample_lbl 578187501 `"Norway 1875"', add
label define sample_lbl 578190001 `"Norway 1900"', add
label define sample_lbl 578191001 `"Norway 1910"', add
label define sample_lbl 586197301 `"Pakistan 1973"', add
label define sample_lbl 586198101 `"Pakistan 1981"', add
label define sample_lbl 586199801 `"Pakistan 1998"', add
label define sample_lbl 275199701 `"Palestine 1997"', add
label define sample_lbl 275200701 `"Palestine 2007"', add
label define sample_lbl 275201701 `"Palestine 2017"', add
label define sample_lbl 591196001 `"Panama 1960"', add
label define sample_lbl 591197001 `"Panama 1970"', add
label define sample_lbl 591198001 `"Panama 1980"', add
label define sample_lbl 591199001 `"Panama 1990"', add
label define sample_lbl 591200001 `"Panama 2000"', add
label define sample_lbl 591201001 `"Panama 2010"', add
label define sample_lbl 598198001 `"Papua New Guinea 1980"', add
label define sample_lbl 598199001 `"Papua New Guinea 1990"', add
label define sample_lbl 598200001 `"Papua New Guinea 2000"', add
label define sample_lbl 600196201 `"Paraguay 1962"', add
label define sample_lbl 600197201 `"Paraguay 1972"', add
label define sample_lbl 600198201 `"Paraguay 1982"', add
label define sample_lbl 600199201 `"Paraguay 1992"', add
label define sample_lbl 600200201 `"Paraguay 2002"', add
label define sample_lbl 604199301 `"Peru 1993"', add
label define sample_lbl 604200701 `"Peru 2007"', add
label define sample_lbl 608199001 `"Philippines 1990"', add
label define sample_lbl 608199501 `"Philippines 1995"', add
label define sample_lbl 608200001 `"Philippines 2000"', add
label define sample_lbl 608201001 `"Philippines 2010"', add
label define sample_lbl 616197801 `"Poland 1978"', add
label define sample_lbl 616198801 `"Poland 1988"', add
label define sample_lbl 616200201 `"Poland 2002"', add
label define sample_lbl 616201101 `"Poland 2011"', add
label define sample_lbl 620198101 `"Portugal 1981"', add
label define sample_lbl 620199101 `"Portugal 1991"', add
label define sample_lbl 620200101 `"Portugal 2001"', add
label define sample_lbl 620201101 `"Portugal 2011"', add
label define sample_lbl 630197001 `"Puerto Rico 1970"', add
label define sample_lbl 630198001 `"Puerto Rico 1980"', add
label define sample_lbl 630199001 `"Puerto Rico 1990"', add
label define sample_lbl 630200001 `"Puerto Rico 2000"', add
label define sample_lbl 630200501 `"Puerto Rico 2005"', add
label define sample_lbl 630201001 `"Puerto Rico 2010"', add
label define sample_lbl 642197701 `"Romania 1977"', add
label define sample_lbl 642199201 `"Romania 1992"', add
label define sample_lbl 642200201 `"Romania 2002"', add
label define sample_lbl 642201101 `"Romania 2011"', add
label define sample_lbl 643200201 `"Russia 2002"', add
label define sample_lbl 643201001 `"Russia 2010"', add
label define sample_lbl 646199101 `"Rwanda 1991"', add
label define sample_lbl 646200201 `"Rwanda 2002"', add
label define sample_lbl 646201201 `"Rwanda 2012"', add
label define sample_lbl 662198001 `"Saint Lucia 1980"', add
label define sample_lbl 662199101 `"Saint Lucia 1991"', add
label define sample_lbl 686198801 `"Senegal 1988"', add
label define sample_lbl 686200201 `"Senegal 2002"', add
label define sample_lbl 686201301 `"Senegal 2013"', add
label define sample_lbl 694200401 `"Sierra Leone 2004"', add
label define sample_lbl 694201501 `"Sierra Leone 2015"', add
label define sample_lbl 703199101 `"Slovak Republic 1991"', add
label define sample_lbl 703200101 `"Slovak Republic 2001"', add
label define sample_lbl 703201101 `"Slovak Republic 2011"', add
label define sample_lbl 705200201 `"Slovenia 2002"', add
label define sample_lbl 710199601 `"South Africa 1996"', add
label define sample_lbl 710200101 `"South Africa 2001"', add
label define sample_lbl 710200701 `"South Africa 2007"', add
label define sample_lbl 710201101 `"South Africa 2011"', add
label define sample_lbl 710201601 `"South Africa 2016"', add
label define sample_lbl 728200801 `"South Sudan 2008"', add
label define sample_lbl 724198101 `"Spain 1981"', add
label define sample_lbl 724199101 `"Spain 1991"', add
label define sample_lbl 724200101 `"Spain 2001"', add
label define sample_lbl 724201101 `"Spain 2011"', add
label define sample_lbl 724200521 `"Spain 2005 Q1 LFS"', add
label define sample_lbl 724200522 `"Spain 2005 Q2 LFS"', add
label define sample_lbl 724200523 `"Spain 2005 Q3 LFS"', add
label define sample_lbl 724200524 `"Spain 2005 Q4 LFS"', add
label define sample_lbl 724200621 `"Spain 2006 Q1 LFS"', add
label define sample_lbl 724200622 `"Spain 2006 Q2 LFS"', add
label define sample_lbl 724200623 `"Spain 2006 Q3 LFS"', add
label define sample_lbl 724200624 `"Spain 2006 Q4 LFS"', add
label define sample_lbl 724200721 `"Spain 2007 Q1 LFS"', add
label define sample_lbl 724200722 `"Spain 2007 Q2 LFS"', add
label define sample_lbl 724200723 `"Spain 2007 Q3 LFS"', add
label define sample_lbl 724200724 `"Spain 2007 Q4 LFS"', add
label define sample_lbl 724200821 `"Spain 2008 Q1 LFS"', add
label define sample_lbl 724200822 `"Spain 2008 Q2 LFS"', add
label define sample_lbl 724200823 `"Spain 2008 Q3 LFS"', add
label define sample_lbl 724200824 `"Spain 2008 Q4 LFS"', add
label define sample_lbl 724200921 `"Spain 2009 Q1 LFS"', add
label define sample_lbl 724200922 `"Spain 2009 Q2 LFS"', add
label define sample_lbl 724200923 `"Spain 2009 Q3 LFS"', add
label define sample_lbl 724200924 `"Spain 2009 Q4 LFS"', add
label define sample_lbl 724201021 `"Spain 2010 Q1 LFS"', add
label define sample_lbl 724201022 `"Spain 2010 Q2 LFS"', add
label define sample_lbl 724201023 `"Spain 2010 Q3 LFS"', add
label define sample_lbl 724201024 `"Spain 2010 Q4 LFS"', add
label define sample_lbl 724201121 `"Spain 2011 Q1 LFS"', add
label define sample_lbl 724201122 `"Spain 2011 Q2 LFS"', add
label define sample_lbl 724201123 `"Spain 2011 Q3 LFS"', add
label define sample_lbl 724201124 `"Spain 2011 Q4 LFS"', add
label define sample_lbl 724201221 `"Spain 2012 Q1 LFS"', add
label define sample_lbl 724201222 `"Spain 2012 Q2 LFS"', add
label define sample_lbl 724201223 `"Spain 2012 Q3 LFS"', add
label define sample_lbl 724201224 `"Spain 2012 Q4 LFS"', add
label define sample_lbl 724201321 `"Spain 2013 Q1 LFS"', add
label define sample_lbl 724201322 `"Spain 2013 Q2 LFS"', add
label define sample_lbl 724201323 `"Spain 2013 Q3 LFS"', add
label define sample_lbl 724201324 `"Spain 2013 Q4 LFS"', add
label define sample_lbl 724201421 `"Spain 2014 Q1 LFS"', add
label define sample_lbl 724201422 `"Spain 2014 Q2 LFS"', add
label define sample_lbl 724201423 `"Spain 2014 Q3 LFS"', add
label define sample_lbl 724201424 `"Spain 2014 Q4 LFS"', add
label define sample_lbl 724201521 `"Spain 2015 Q1 LFS"', add
label define sample_lbl 724201522 `"Spain 2015 Q2 LFS"', add
label define sample_lbl 724201523 `"Spain 2015 Q3 LFS"', add
label define sample_lbl 724201524 `"Spain 2015 Q4 LFS"', add
label define sample_lbl 724201621 `"Spain 2016 Q1 LFS"', add
label define sample_lbl 724201622 `"Spain 2016 Q2 LFS"', add
label define sample_lbl 724201623 `"Spain 2016 Q3 LFS"', add
label define sample_lbl 724201624 `"Spain 2016 Q4 LFS"', add
label define sample_lbl 724201721 `"Spain 2017 Q1 LFS"', add
label define sample_lbl 724201722 `"Spain 2017 Q2 LFS"', add
label define sample_lbl 724201723 `"Spain 2017 Q3 LFS"', add
label define sample_lbl 724201724 `"Spain 2017 Q4 LFS"', add
label define sample_lbl 724201821 `"Spain 2018 Q1 LFS"', add
label define sample_lbl 724201822 `"Spain 2018 Q2 LFS"', add
label define sample_lbl 724201823 `"Spain 2018 Q3 LFS"', add
label define sample_lbl 724201824 `"Spain 2018 Q4 LFS"', add
label define sample_lbl 724201921 `"Spain 2019 Q1 LFS"', add
label define sample_lbl 724201922 `"Spain 2019 Q2 LFS"', add
label define sample_lbl 724201923 `"Spain 2019 Q3 LFS"', add
label define sample_lbl 724201924 `"Spain 2019 Q4 LFS"', add
label define sample_lbl 724202021 `"Spain 2020 Q1 LFS"', add
label define sample_lbl 724202022 `"Spain 2020 Q2 LFS"', add
label define sample_lbl 724202023 `"Spain 2020 Q3 LFS"', add
label define sample_lbl 724202024 `"Spain 2020 Q4 LFS"', add
label define sample_lbl 729200801 `"Sudan 2008"', add
label define sample_lbl 740200401 `"Suriname 2004"', add
label define sample_lbl 740201201 `"Suriname 2012"', add
label define sample_lbl 752188001 `"Sweden 1880"', add
label define sample_lbl 752189001 `"Sweden 1890"', add
label define sample_lbl 752190001 `"Sweden 1900"', add
label define sample_lbl 752191001 `"Sweden 1910"', add
label define sample_lbl 756197001 `"Switzerland 1970"', add
label define sample_lbl 756198001 `"Switzerland 1980"', add
label define sample_lbl 756199001 `"Switzerland 1990"', add
label define sample_lbl 756200001 `"Switzerland 2000"', add
label define sample_lbl 834198801 `"Tanzania 1988"', add
label define sample_lbl 834200201 `"Tanzania 2002"', add
label define sample_lbl 834201201 `"Tanzania 2012"', add
label define sample_lbl 764197001 `"Thailand 1970"', add
label define sample_lbl 764198001 `"Thailand 1980"', add
label define sample_lbl 764199001 `"Thailand 1990"', add
label define sample_lbl 764200001 `"Thailand 2000"', add
label define sample_lbl 768196001 `"Togo 1960"', add
label define sample_lbl 768197001 `"Togo 1970"', add
label define sample_lbl 768201001 `"Togo 2010"', add
label define sample_lbl 780197001 `"Trinidad and Tobago 1970"', add
label define sample_lbl 780198001 `"Trinidad and Tobago 1980"', add
label define sample_lbl 780199001 `"Trinidad and Tobago 1990"', add
label define sample_lbl 780200001 `"Trinidad and Tobago 2000"', add
label define sample_lbl 780201101 `"Trinidad and Tobago 2011"', add
label define sample_lbl 792198501 `"Turkey 1985"', add
label define sample_lbl 792199001 `"Turkey 1990"', add
label define sample_lbl 792200001 `"Turkey 2000"', add
label define sample_lbl 800199101 `"Uganda 1991"', add
label define sample_lbl 800200201 `"Uganda 2002"', add
label define sample_lbl 800201401 `"Uganda 2014"', add
label define sample_lbl 804200101 `"Ukraine 2001"', add
label define sample_lbl 826185101 `"United Kingdom 1851 (England and Wales)"', add
label define sample_lbl 826185102 `"United Kingdom 1851 (Scotland)"', add
label define sample_lbl 826185103 `"United Kingdom 1851 (2% sample)"', add
label define sample_lbl 826186101 `"United Kingdom 1861 (England and Wales)"', add
label define sample_lbl 826186102 `"United Kingdom 1861 (Scotland)"', add
label define sample_lbl 826187101 `"United Kingdom 1871 (Scotland)"', add
label define sample_lbl 826188101 `"United Kingdom 1881 (England and Wales)"', add
label define sample_lbl 826188102 `"United Kingdom 1881 (Scotland)"', add
label define sample_lbl 826189101 `"United Kingdom 1891 (England and Wales)"', add
label define sample_lbl 826189102 `"United Kingdom 1891 (Scotland)"', add
label define sample_lbl 826190101 `"United Kingdom 1901 (England and Wales)"', add
label define sample_lbl 826190102 `"United Kingdom 1901 (Scotland)"', add
label define sample_lbl 826191101 `"United Kingdom 1911 (England and Wales)"', add
label define sample_lbl 826199101 `"United Kingdom 1991"', add
label define sample_lbl 826200101 `"United Kingdom 2001"', add
label define sample_lbl 840185001 `"United States 1850 (100%)"', add
label define sample_lbl 840185002 `"United States 1850 (1%)"', add
label define sample_lbl 840186001 `"United States 1860 (1%)"', add
label define sample_lbl 840187001 `"United States 1870 (1%)"', add
label define sample_lbl 840188001 `"United States 1880 (100%)"', add
label define sample_lbl 840188002 `"United States 1880 (10%)"', add
label define sample_lbl 840190001 `"United States 1900 (5%)"', add
label define sample_lbl 840191001 `"United States 1910 (1%)"', add
label define sample_lbl 840196001 `"United States 1960"', add
label define sample_lbl 840197001 `"United States 1970"', add
label define sample_lbl 840198001 `"United States 1980"', add
label define sample_lbl 840199001 `"United States 1990"', add
label define sample_lbl 840200001 `"United States 2000"', add
label define sample_lbl 840200501 `"United States 2005"', add
label define sample_lbl 840201001 `"United States 2010"', add
label define sample_lbl 840201501 `"United States 2015"', add
label define sample_lbl 858196301 `"Uruguay 1963"', add
label define sample_lbl 858196302 `"Uruguay 1963 (full count)"', add
label define sample_lbl 858197501 `"Uruguay 1975"', add
label define sample_lbl 858197502 `"Uruguay 1975 (full count)"', add
label define sample_lbl 858198501 `"Uruguay 1985"', add
label define sample_lbl 858198502 `"Uruguay 1985 (full count)"', add
label define sample_lbl 858199601 `"Uruguay 1996"', add
label define sample_lbl 858199602 `"Uruguay 1996 (full count)"', add
label define sample_lbl 858200621 `"Uruguay 2006"', add
label define sample_lbl 858201101 `"Uruguay 2011"', add
label define sample_lbl 858201102 `"Uruguay 2011 (full count)"', add
label define sample_lbl 862197101 `"Venezuela 1971"', add
label define sample_lbl 862198101 `"Venezuela 1981"', add
label define sample_lbl 862199001 `"Venezuela 1990"', add
label define sample_lbl 862200101 `"Venezuela 2001"', add
label define sample_lbl 704198901 `"Vietnam 1989"', add
label define sample_lbl 704199901 `"Vietnam 1999"', add
label define sample_lbl 704200901 `"Vietnam 2009"', add
label define sample_lbl 894199001 `"Zambia 1990"', add
label define sample_lbl 894200001 `"Zambia 2000"', add
label define sample_lbl 894201001 `"Zambia 2010"', add
label define sample_lbl 716201201 `"Zimbabwe 2012"', add
label values sample sample_lbl

label define geo1alt_ma_lbl 504001 `"Oued-Ed-Dahab-Lagouira"'
label define geo1alt_ma_lbl 504002 `"Laâyoune-Boujdour-Sakia El Hamra"', add
label define geo1alt_ma_lbl 504003 `"Guelmin-Es-Samara"', add
label define geo1alt_ma_lbl 504004 `"Souss-Massa-Draâ"', add
label define geo1alt_ma_lbl 504005 `"Charb-Chrarda-Béni Hssen"', add
label define geo1alt_ma_lbl 504006 `"Chaouia-Ouardigha"', add
label define geo1alt_ma_lbl 504007 `"Marrakech-Tensift-Al Haouz"', add
label define geo1alt_ma_lbl 504008 `"Oriental"', add
label define geo1alt_ma_lbl 504009 `"Grand-Casablanca"', add
label define geo1alt_ma_lbl 504010 `"Rabat-Salé-Zemmour-Zaer"', add
label define geo1alt_ma_lbl 504011 `"Doukala Abda"', add
label define geo1alt_ma_lbl 504012 `"Tadla Azilal"', add
label define geo1alt_ma_lbl 504013 `"Meknès-Tafilalet"', add
label define geo1alt_ma_lbl 504014 `"Fès-Boulemane"', add
label define geo1alt_ma_lbl 504015 `"Taza-Al Heiceima-Taounate"', add
label define geo1alt_ma_lbl 504016 `"Tanger-Tétouan"', add
label values geo1alt_ma geo1alt_ma_lbl

label define geo1_ma1994_lbl 001 `"Oued-Ed-Dahab-Lagouira"'
label define geo1_ma1994_lbl 002 `"Laâyoune-Boujdour-Sakia El Hamra"', add
label define geo1_ma1994_lbl 003 `"Guelmin-Es-Samara"', add
label define geo1_ma1994_lbl 004 `"Souss-Massa-Draâ"', add
label define geo1_ma1994_lbl 005 `"Charb-Chrarda-Béni Hssen"', add
label define geo1_ma1994_lbl 006 `"Chaouia-Ouardigha"', add
label define geo1_ma1994_lbl 007 `"Marrakech-Tensift-Al Haouz"', add
label define geo1_ma1994_lbl 008 `"Oriental"', add
label define geo1_ma1994_lbl 009 `"Grand-Casablanca"', add
label define geo1_ma1994_lbl 010 `"Rabat-Salé-Zemmour-Zaer"', add
label define geo1_ma1994_lbl 011 `"Doukala Abda"', add
label define geo1_ma1994_lbl 012 `"Tadla Azilal"', add
label define geo1_ma1994_lbl 013 `"Meknès-Tafilalet"', add
label define geo1_ma1994_lbl 014 `"Fès-Boulemane"', add
label define geo1_ma1994_lbl 015 `"Taza-Al Heiceima-Taounate"', add
label define geo1_ma1994_lbl 016 `"Tanger-Tétouan"', add
label values geo1_ma1994 geo1_ma1994_lbl

label define geo2alt_ma_lbl 504001391 `"Oued-Ed-Dahab, Aousserd"'
label define geo2alt_ma_lbl 504002321 `"Laâyoune, Boujdour"', add
label define geo2alt_ma_lbl 504003071 `"Assa-Zag"', add
label define geo2alt_ma_lbl 504003221 `"Es-Semara"', add
label define geo2alt_ma_lbl 504003261 `"Guelmim"', add
label define geo2alt_ma_lbl 504003521 `"Tan-Tan"', add
label define geo2alt_ma_lbl 504003551 `"Tata"', add
label define geo2alt_ma_lbl 504004001 `"Agadir-Ida Ou Tanane"', add
label define geo2alt_ma_lbl 504004163 `"Chtouka-Aït Baha"', add
label define geo2alt_ma_lbl 504004273 `"Inezgane-Aït Melloul"', add
label define geo2alt_ma_lbl 504004401 `"Ouarzazate, Zagora"', add
label define geo2alt_ma_lbl 504004541 `"Taroudannt"', add
label define geo2alt_ma_lbl 504004581 `"Tiznit"', add
label define geo2alt_ma_lbl 504005281 `"Kénitra"', add
label define geo2alt_ma_lbl 504005481 `"Sidi-Kacem"', add
label define geo2alt_ma_lbl 504006111 `"Benslimane"', add
label define geo2alt_ma_lbl 504006311 `"Khouribga"', add
label define geo2alt_ma_lbl 504006461 `"Settat"', add
label define geo2alt_ma_lbl 504007041 `"Al Haouz"', add
label define geo2alt_ma_lbl 504007161 `"Chicaoua"', add
label define geo2alt_ma_lbl 504007191 `"El Kelaâ des Sraghna"', add
label define geo2alt_ma_lbl 504007211 `"Essaouira"', add
label define geo2alt_ma_lbl 504007351 `"Marrakech, Marrakech-Menara, Marrakech-Medina, Sidi Youssef-Ben ali"', add
label define geo2alt_ma_lbl 504008113 `"Berkane, Taourirt"', add
label define geo2alt_ma_lbl 504008251 `"Figuig"', add
label define geo2alt_ma_lbl 504008275 `"Jerada"', add
label define geo2alt_ma_lbl 504008381 `"Nador"', add
label define geo2alt_ma_lbl 504008411 `"Oujda-Angad"', add
label define geo2alt_ma_lbl 504009141 `"Casablanca, Ain Chock-Hay Hassani, Ain Sebaa-Hay Mohammadi, Al Fida-Derb Sultan, Ben Msick-Sidi Othmane, Machouar-Casablanca, Sidi Bernoussi-Zenata"', add
label define geo2alt_ma_lbl 504009371 `"Mohammedia"', add
label define geo2alt_ma_lbl 504010291 `"Khémisset"', add
label define geo2alt_ma_lbl 504010421 `"Rabat"', add
label define geo2alt_ma_lbl 504010441 `"Salé"', add
label define geo2alt_ma_lbl 504010501 `"Skhirate-Témara"', add
label define geo2alt_ma_lbl 504011181 `"El-Jadida"', add
label define geo2alt_ma_lbl 504011431 `"Safi"', add
label define geo2alt_ma_lbl 504012081 `"Azilal"', add
label define geo2alt_ma_lbl 504012091 `"Béni Mellal"', add
label define geo2alt_ma_lbl 504013061 `"Meknès, Al Ismalia"', add
label define geo2alt_ma_lbl 504013171 `"El Hajeb"', add
label define geo2alt_ma_lbl 504013201 `"Errachidia"', add
label define geo2alt_ma_lbl 504013271 `"Ifrane"', add
label define geo2alt_ma_lbl 504013301 `"Khénifra"', add
label define geo2alt_ma_lbl 504014131 `"Boulemane"', add
label define geo2alt_ma_lbl 504014231 `"Fès, Fès-Medina, Fès El Jadid Dar Dibbagh"', add
label define geo2alt_ma_lbl 504014451 `"Sefrou"', add
label define geo2alt_ma_lbl 504014591 `"Moulay Yacoub"', add
label define geo2alt_ma_lbl 504015051 `"Al Hoceïma"', add
label define geo2alt_ma_lbl 504015531 `"Taounate"', add
label define geo2alt_ma_lbl 504015561 `"Taza"', add
label define geo2alt_ma_lbl 504016151 `"Chefchaouen"', add
label define geo2alt_ma_lbl 504016331 `"Tanger-Assilah, Fahs-Anjra"', add
label define geo2alt_ma_lbl 504016511 `"Larache"', add
label define geo2alt_ma_lbl 504016571 `"Tétouan"', add
label values geo2alt_ma geo2alt_ma_lbl

label define geo2_ma1994_lbl 001391 `"Aousserd, Oued-Ed-Dahab"'
label define geo2_ma1994_lbl 002121 `"Boujdour"', add
label define geo2_ma1994_lbl 002321 `"Laâyoune"', add
label define geo2_ma1994_lbl 003071 `"Assa-Zag"', add
label define geo2_ma1994_lbl 003221 `"Es-Semara"', add
label define geo2_ma1994_lbl 003261 `"Guelmim"', add
label define geo2_ma1994_lbl 003521 `"Tan-Tan"', add
label define geo2_ma1994_lbl 003551 `"Tata"', add
label define geo2_ma1994_lbl 004001 `"Agadir-Ida Ou Tanane"', add
label define geo2_ma1994_lbl 004163 `"Chtouka-Aït Baha"', add
label define geo2_ma1994_lbl 004273 `"Inezgane-Aït Melloul"', add
label define geo2_ma1994_lbl 004401 `"Ouarzazate"', add
label define geo2_ma1994_lbl 004587 `"Zagora"', add
label define geo2_ma1994_lbl 004541 `"Taroudannt"', add
label define geo2_ma1994_lbl 004581 `"Tiznit"', add
label define geo2_ma1994_lbl 005281 `"Kénitra"', add
label define geo2_ma1994_lbl 005481 `"Sidi-Kacem"', add
label define geo2_ma1994_lbl 006111 `"Benslimane"', add
label define geo2_ma1994_lbl 006311 `"Khouribga"', add
label define geo2_ma1994_lbl 006461 `"Settat"', add
label define geo2_ma1994_lbl 007041 `"Al Haouz"', add
label define geo2_ma1994_lbl 007161 `"Chicaoua"', add
label define geo2_ma1994_lbl 007191 `"El Kelaâ des Sraghna"', add
label define geo2_ma1994_lbl 007211 `"Essaouira"', add
label define geo2_ma1994_lbl 007351 `"Marrakech"', add
label define geo2_ma1994_lbl 008113 `"Berkane"', add
label define geo2_ma1994_lbl 008533 `"Taourirt"', add
label define geo2_ma1994_lbl 008251 `"Figuig"', add
label define geo2_ma1994_lbl 008275 `"Jerada"', add
label define geo2_ma1994_lbl 008381 `"Nador"', add
label define geo2_ma1994_lbl 008411 `"Oujda-Angad"', add
label define geo2_ma1994_lbl 009141 `"Casablanca"', add
label define geo2_ma1994_lbl 009355 `"Médiouna"', add
label define geo2_ma1994_lbl 009385 `"Nouaceur"', add
label define geo2_ma1994_lbl 009371 `"Mohammedia"', add
label define geo2_ma1994_lbl 010291 `"Khémisset"', add
label define geo2_ma1994_lbl 010421 `"Rabat"', add
label define geo2_ma1994_lbl 010441 `"Salé"', add
label define geo2_ma1994_lbl 010501 `"Skhirate-Témara"', add
label define geo2_ma1994_lbl 011181 `"El-Jadida"', add
label define geo2_ma1994_lbl 011431 `"Safi"', add
label define geo2_ma1994_lbl 012081 `"Azilal"', add
label define geo2_ma1994_lbl 012091 `"Béni Mellal"', add
label define geo2_ma1994_lbl 013061 `"Meknès"', add
label define geo2_ma1994_lbl 013171 `"El Hajeb"', add
label define geo2_ma1994_lbl 013201 `"Errachidia"', add
label define geo2_ma1994_lbl 013271 `"Ifrane"', add
label define geo2_ma1994_lbl 013301 `"Khénifra"', add
label define geo2_ma1994_lbl 014131 `"Boulemane"', add
label define geo2_ma1994_lbl 014231 `"Fès"', add
label define geo2_ma1994_lbl 014451 `"Sefrou"', add
label define geo2_ma1994_lbl 014591 `"Moulay Yacoub"', add
label define geo2_ma1994_lbl 015051 `"Al Hoceïma"', add
label define geo2_ma1994_lbl 015531 `"Taounate"', add
label define geo2_ma1994_lbl 015561 `"Taza"', add
label define geo2_ma1994_lbl 016151 `"Chefchaouen"', add
label define geo2_ma1994_lbl 016227 `"Fahs-Anjra"', add
label define geo2_ma1994_lbl 016511 `"Tanger-Assilah"', add
label define geo2_ma1994_lbl 016331 `"Larache"', add
label define geo2_ma1994_lbl 016571 `"Tétouan"', add
label values geo2_ma1994 geo2_ma1994_lbl

label define hhtype_lbl 00 `"Vacant household"'
label define hhtype_lbl 01 `"One-person household"', add
label define hhtype_lbl 02 `"Married/cohab couple, no children"', add
label define hhtype_lbl 03 `"Married/cohab couple with children"', add
label define hhtype_lbl 04 `"Single-parent family"', add
label define hhtype_lbl 05 `"Polygamous family"', add
label define hhtype_lbl 06 `"Extended family, relatives only"', add
label define hhtype_lbl 07 `"Composite household, family and non-relatives"', add
label define hhtype_lbl 08 `"Non-family household"', add
label define hhtype_lbl 09 `"Unclassified subfamily"', add
label define hhtype_lbl 10 `"Other relative or non-relative household"', add
label define hhtype_lbl 11 `"Group quarters"', add
label define hhtype_lbl 99 `"Unclassifiable"', add
label values hhtype hhtype_lbl

label define nfams_lbl 0 `"Vacant household"'
label define nfams_lbl 1 `"1 family"', add
label define nfams_lbl 2 `"2 families"', add
label define nfams_lbl 3 `"3 families"', add
label define nfams_lbl 4 `"4 families"', add
label define nfams_lbl 5 `"5 families"', add
label define nfams_lbl 6 `"6 families"', add
label define nfams_lbl 7 `"7 families"', add
label define nfams_lbl 8 `"8 families"', add
label define nfams_lbl 9 `"9 or more families"', add
label values nfams nfams_lbl

label define ncouples_lbl 0 `"No married couples in household"'
label define ncouples_lbl 1 `"1 couple"', add
label define ncouples_lbl 2 `"2 couples"', add
label define ncouples_lbl 3 `"3 couples"', add
label define ncouples_lbl 4 `"4 couples"', add
label define ncouples_lbl 5 `"5 couples"', add
label define ncouples_lbl 6 `"6 couples"', add
label define ncouples_lbl 7 `"7 couples"', add
label define ncouples_lbl 8 `"8 couples"', add
label define ncouples_lbl 9 `"9 or more couples"', add
label values ncouples ncouples_lbl

label define nmothers_lbl 0 `"No mothers in household"'
label define nmothers_lbl 1 `"1 mother"', add
label define nmothers_lbl 2 `"2 mothers"', add
label define nmothers_lbl 3 `"3 mothers"', add
label define nmothers_lbl 4 `"4 mothers"', add
label define nmothers_lbl 5 `"5 mothers"', add
label define nmothers_lbl 6 `"6 mothers"', add
label define nmothers_lbl 7 `"7 mothers"', add
label define nmothers_lbl 8 `"8 mothers"', add
label define nmothers_lbl 9 `"9 or more mothers in household"', add
label values nmothers nmothers_lbl

label define nfathers_lbl 0 `"No fathers in household"'
label define nfathers_lbl 1 `"1 father"', add
label define nfathers_lbl 2 `"2 fathers"', add
label define nfathers_lbl 3 `"3 fathers"', add
label define nfathers_lbl 4 `"4 fathers"', add
label define nfathers_lbl 5 `"5 fathers"', add
label define nfathers_lbl 6 `"6 fathers"', add
label define nfathers_lbl 7 `"7 fathers"', add
label define nfathers_lbl 8 `"8 fathers"', add
label define nfathers_lbl 9 `"9 or more fathers in household"', add
label values nfathers nfathers_lbl

label define ma1994a_dwelltyp_lbl 00 `"Villa, one-storey dwelling"'
label define ma1994a_dwelltyp_lbl 01 `"Appartment, flat"', add
label define ma1994a_dwelltyp_lbl 02 `"Traditional house"', add
label define ma1994a_dwelltyp_lbl 03 `"Modern house"', add
label define ma1994a_dwelltyp_lbl 04 `"Studio"', add
label define ma1994a_dwelltyp_lbl 05 `"Informal building / shack"', add
label define ma1994a_dwelltyp_lbl 06 `"Premises not designed for dwelling"', add
label define ma1994a_dwelltyp_lbl 07 `"Rural dwelling"', add
label define ma1994a_dwelltyp_lbl 08 `"Other type of dwelling"', add
label define ma1994a_dwelltyp_lbl 98 `"Unknown"', add
label define ma1994a_dwelltyp_lbl 99 `"NIU (not in universe)"', add
label values ma1994a_dwelltyp ma1994a_dwelltyp_lbl

label define parrule_lbl 00 `"No parent of person in household"'
label define parrule_lbl 11 `"Link to head or spouse, unambiguous"', add
label define parrule_lbl 12 `"Link to head or spouse, ambiguous"', add
label define parrule_lbl 21 `"Child-Grandchild, within empirical child cap"', add
label define parrule_lbl 22 `"Child-Grandchild, within constructed child cap"', add
label define parrule_lbl 23 `"Child-Grandchild, exceeds child cap"', add
label define parrule_lbl 31 `"Specified Other Relatives, within empirical child cap"', add
label define parrule_lbl 32 `"Specified Other Relatives, within constructed child cap"', add
label define parrule_lbl 33 `"Specified Other Relatives, exceeds child cap"', add
label define parrule_lbl 41 `"Other Relatives, within empirical child cap"', add
label define parrule_lbl 42 `"Other Relatives, within constructed child cap"', add
label define parrule_lbl 51 `"Non-Relatives, within empirical child cap"', add
label define parrule_lbl 52 `"Non-Relatives, within constructed child cap"', add
label values parrule parrule_lbl

label define sprule_lbl 00 `"No spouse present"'
label define sprule_lbl 01 `"Rule 1: strong relationship pairing, couple adjacent"', add
label define sprule_lbl 02 `"Rule 2: strong relationship pairing, couple not adjacent"', add
label define sprule_lbl 03 `"Rule 3: weak relationship pairing, couple adjacent"', add
label define sprule_lbl 04 `"Rule 4: weak relationship pairing, couple not adjacent"', add
label define sprule_lbl 05 `"Rule 5: weak consensual union pairings"', add
label define sprule_lbl 06 `"Rule 6: sample-specific rules (usually child-to-child)"', add
label values sprule sprule_lbl

label define famsize_lbl 0001 `"1 family member present"'
label define famsize_lbl 0002 `"2 family members present"', add
label define famsize_lbl 0003 `"3 family members present"', add
label define famsize_lbl 0004 `"4"', add
label define famsize_lbl 0005 `"5"', add
label define famsize_lbl 0006 `"6"', add
label define famsize_lbl 0007 `"7"', add
label define famsize_lbl 0008 `"8"', add
label define famsize_lbl 0009 `"9"', add
label define famsize_lbl 0010 `"10"', add
label define famsize_lbl 0011 `"11"', add
label define famsize_lbl 0012 `"12"', add
label define famsize_lbl 0013 `"13"', add
label define famsize_lbl 0014 `"14"', add
label define famsize_lbl 0015 `"15"', add
label define famsize_lbl 0016 `"16"', add
label define famsize_lbl 0017 `"17"', add
label define famsize_lbl 0018 `"18"', add
label define famsize_lbl 0019 `"19"', add
label define famsize_lbl 0020 `"20"', add
label define famsize_lbl 0021 `"21"', add
label define famsize_lbl 0022 `"22"', add
label define famsize_lbl 0023 `"23"', add
label define famsize_lbl 0024 `"24"', add
label define famsize_lbl 0025 `"25"', add
label define famsize_lbl 0026 `"26"', add
label define famsize_lbl 0027 `"27"', add
label define famsize_lbl 0028 `"28"', add
label define famsize_lbl 0029 `"29"', add
label define famsize_lbl 0030 `"30"', add
label define famsize_lbl 0031 `"31"', add
label define famsize_lbl 0032 `"32"', add
label define famsize_lbl 0033 `"33"', add
label define famsize_lbl 0034 `"34"', add
label define famsize_lbl 0035 `"35"', add
label define famsize_lbl 0036 `"36"', add
label define famsize_lbl 0037 `"37"', add
label define famsize_lbl 0038 `"38"', add
label define famsize_lbl 0039 `"39"', add
label define famsize_lbl 0040 `"40"', add
label define famsize_lbl 0041 `"41"', add
label define famsize_lbl 0042 `"42"', add
label define famsize_lbl 0043 `"43"', add
label define famsize_lbl 0044 `"44"', add
label define famsize_lbl 0045 `"45"', add
label define famsize_lbl 0046 `"46"', add
label define famsize_lbl 0047 `"47"', add
label define famsize_lbl 0048 `"48"', add
label define famsize_lbl 0049 `"49"', add
label define famsize_lbl 0050 `"50"', add
label define famsize_lbl 0051 `"51"', add
label define famsize_lbl 0052 `"52"', add
label define famsize_lbl 0053 `"53"', add
label define famsize_lbl 0054 `"54"', add
label define famsize_lbl 0055 `"55"', add
label define famsize_lbl 0056 `"56"', add
label define famsize_lbl 0057 `"57"', add
label define famsize_lbl 0058 `"58"', add
label define famsize_lbl 0059 `"59"', add
label define famsize_lbl 0060 `"60"', add
label define famsize_lbl 0061 `"61"', add
label define famsize_lbl 0062 `"62"', add
label define famsize_lbl 0063 `"63"', add
label define famsize_lbl 0064 `"64"', add
label define famsize_lbl 0065 `"65"', add
label define famsize_lbl 0066 `"66"', add
label define famsize_lbl 0067 `"67"', add
label define famsize_lbl 0068 `"68"', add
label define famsize_lbl 0069 `"69"', add
label define famsize_lbl 0070 `"70"', add
label define famsize_lbl 0071 `"71"', add
label define famsize_lbl 0072 `"72"', add
label define famsize_lbl 0073 `"73"', add
label define famsize_lbl 0074 `"74"', add
label define famsize_lbl 0075 `"75"', add
label define famsize_lbl 0076 `"76"', add
label define famsize_lbl 0077 `"77"', add
label define famsize_lbl 0078 `"78"', add
label define famsize_lbl 0079 `"79"', add
label define famsize_lbl 0080 `"80"', add
label define famsize_lbl 0081 `"81"', add
label define famsize_lbl 0082 `"82"', add
label define famsize_lbl 0083 `"83"', add
label define famsize_lbl 0084 `"84"', add
label define famsize_lbl 0085 `"85"', add
label define famsize_lbl 0086 `"86"', add
label define famsize_lbl 0087 `"87"', add
label define famsize_lbl 0088 `"88"', add
label define famsize_lbl 0089 `"89"', add
label define famsize_lbl 0090 `"90"', add
label define famsize_lbl 0091 `"91"', add
label define famsize_lbl 0092 `"92"', add
label define famsize_lbl 0093 `"93"', add
label define famsize_lbl 0094 `"94"', add
label define famsize_lbl 0095 `"95"', add
label define famsize_lbl 0096 `"96"', add
label define famsize_lbl 0097 `"97"', add
label define famsize_lbl 0098 `"98"', add
label define famsize_lbl 0099 `"99 or more persons"', add
label values famsize famsize_lbl

label define nchild_lbl 00 `"0"'
label define nchild_lbl 01 `"1"', add
label define nchild_lbl 02 `"2"', add
label define nchild_lbl 03 `"3"', add
label define nchild_lbl 04 `"4"', add
label define nchild_lbl 05 `"5"', add
label define nchild_lbl 06 `"6"', add
label define nchild_lbl 07 `"7"', add
label define nchild_lbl 08 `"8"', add
label define nchild_lbl 09 `"9 or more children in household"', add
label values nchild nchild_lbl

label define eldch_lbl 00 `"0"'
label define eldch_lbl 01 `"1"', add
label define eldch_lbl 02 `"2"', add
label define eldch_lbl 03 `"3"', add
label define eldch_lbl 04 `"4"', add
label define eldch_lbl 05 `"5"', add
label define eldch_lbl 06 `"6"', add
label define eldch_lbl 07 `"7"', add
label define eldch_lbl 08 `"8"', add
label define eldch_lbl 09 `"9"', add
label define eldch_lbl 10 `"10"', add
label define eldch_lbl 11 `"11"', add
label define eldch_lbl 12 `"12"', add
label define eldch_lbl 13 `"13"', add
label define eldch_lbl 14 `"14"', add
label define eldch_lbl 15 `"15"', add
label define eldch_lbl 16 `"16"', add
label define eldch_lbl 17 `"17"', add
label define eldch_lbl 18 `"18"', add
label define eldch_lbl 19 `"19"', add
label define eldch_lbl 20 `"20"', add
label define eldch_lbl 21 `"21"', add
label define eldch_lbl 22 `"22"', add
label define eldch_lbl 23 `"23"', add
label define eldch_lbl 24 `"24"', add
label define eldch_lbl 25 `"25"', add
label define eldch_lbl 26 `"26"', add
label define eldch_lbl 27 `"27"', add
label define eldch_lbl 28 `"28"', add
label define eldch_lbl 29 `"29"', add
label define eldch_lbl 30 `"30"', add
label define eldch_lbl 31 `"31"', add
label define eldch_lbl 32 `"32"', add
label define eldch_lbl 33 `"33"', add
label define eldch_lbl 34 `"34"', add
label define eldch_lbl 35 `"35"', add
label define eldch_lbl 36 `"36"', add
label define eldch_lbl 37 `"37"', add
label define eldch_lbl 38 `"38"', add
label define eldch_lbl 39 `"39"', add
label define eldch_lbl 40 `"40"', add
label define eldch_lbl 41 `"41"', add
label define eldch_lbl 42 `"42"', add
label define eldch_lbl 43 `"43"', add
label define eldch_lbl 44 `"44"', add
label define eldch_lbl 45 `"45"', add
label define eldch_lbl 46 `"46"', add
label define eldch_lbl 47 `"47"', add
label define eldch_lbl 48 `"48"', add
label define eldch_lbl 49 `"49"', add
label define eldch_lbl 50 `"50 or older"', add
label define eldch_lbl 98 `"One or more children have unknown age"', add
label define eldch_lbl 99 `"No own child in household"', add
label values eldch eldch_lbl

label define relate_lbl 1 `"Head"'
label define relate_lbl 2 `"Spouse/partner"', add
label define relate_lbl 3 `"Child"', add
label define relate_lbl 4 `"Other relative"', add
label define relate_lbl 5 `"Non-relative"', add
label define relate_lbl 6 `"Other relative or non-relative"', add
label define relate_lbl 9 `"Unknown"', add
label values relate relate_lbl

label define related_lbl 1000 `"Head"'
label define related_lbl 2000 `"Spouse/partner"', add
label define related_lbl 2100 `"Spouse"', add
label define related_lbl 2200 `"Unmarried partner"', add
label define related_lbl 2210 `"Civil union"', add
label define related_lbl 2300 `"Same-sex spouse/partner"', add
label define related_lbl 3000 `"Child"', add
label define related_lbl 3100 `"Biological child"', add
label define related_lbl 3200 `"Adopted child"', add
label define related_lbl 3300 `"Stepchild"', add
label define related_lbl 3400 `"Child/child-in-law"', add
label define related_lbl 3500 `"Child/child-in-law/grandchild"', add
label define related_lbl 3600 `"Child of unmarried partner"', add
label define related_lbl 4000 `"Other relative"', add
label define related_lbl 4100 `"Grandchild"', add
label define related_lbl 4110 `"Grandchild or great grandchild"', add
label define related_lbl 4120 `"Great grandchild"', add
label define related_lbl 4130 `"Great-great grandchild"', add
label define related_lbl 4200 `"Parent/parent-in-law"', add
label define related_lbl 4210 `"Parent"', add
label define related_lbl 4211 `"Stepparent"', add
label define related_lbl 4220 `"Parent-in-law"', add
label define related_lbl 4300 `"Child-in-law"', add
label define related_lbl 4301 `"Daughter-in-law"', add
label define related_lbl 4302 `"Spouse/partner of child"', add
label define related_lbl 4310 `"Unmarried partner of child"', add
label define related_lbl 4400 `"Sibling/sibling-in-law"', add
label define related_lbl 4410 `"Sibling"', add
label define related_lbl 4420 `"Stepsibling"', add
label define related_lbl 4430 `"Sibling-in-law"', add
label define related_lbl 4431 `"Sibling of spouse/partner"', add
label define related_lbl 4432 `"Spouse/partner of sibling"', add
label define related_lbl 4500 `"Grandparent"', add
label define related_lbl 4510 `"Great grandparent"', add
label define related_lbl 4600 `"Parent/grandparent/ascendant"', add
label define related_lbl 4700 `"Aunt/uncle"', add
label define related_lbl 4800 `"Other specified relative"', add
label define related_lbl 4810 `"Nephew/niece"', add
label define related_lbl 4820 `"Cousin"', add
label define related_lbl 4830 `"Sibling's sibling-in-law"', add
label define related_lbl 4900 `"Other relative, not elsewhere classified"', add
label define related_lbl 4910 `"Other relative with same family name"', add
label define related_lbl 4920 `"Other relative with different family name"', add
label define related_lbl 4930 `"Other relative, not specified (secondary family)"', add
label define related_lbl 5000 `"Non-relative"', add
label define related_lbl 5100 `"Friend/guest/visitor/partner"', add
label define related_lbl 5110 `"Partner/friend"', add
label define related_lbl 5111 `"Friend"', add
label define related_lbl 5112 `"Partner/roommate"', add
label define related_lbl 5113 `"Housemate/roommate"', add
label define related_lbl 5120 `"Visitor"', add
label define related_lbl 5130 `"Ex-spouse"', add
label define related_lbl 5140 `"Godparent"', add
label define related_lbl 5150 `"Godchild"', add
label define related_lbl 5200 `"Employee"', add
label define related_lbl 5210 `"Domestic employee"', add
label define related_lbl 5220 `"Relative of employee, n.s."', add
label define related_lbl 5221 `"Spouse of servant"', add
label define related_lbl 5222 `"Child of servant"', add
label define related_lbl 5223 `"Other relative of servant"', add
label define related_lbl 5300 `"Roomer/boarder/lodger/foster child"', add
label define related_lbl 5310 `"Boarder"', add
label define related_lbl 5311 `"Boarder or guest"', add
label define related_lbl 5320 `"Lodger"', add
label define related_lbl 5330 `"Foster child"', add
label define related_lbl 5340 `"Tutored/foster child"', add
label define related_lbl 5350 `"Tutored child"', add
label define related_lbl 5400 `"Employee, boarder, or guest"', add
label define related_lbl 5500 `"Other specified non-relative"', add
label define related_lbl 5510 `"Agregado"', add
label define related_lbl 5520 `"Temporary resident, guest"', add
label define related_lbl 5600 `"Group quarters"', add
label define related_lbl 5610 `"Group quarters, non-inmates"', add
label define related_lbl 5620 `"Institutional inmates"', add
label define related_lbl 5900 `"Non-relative, n.e.c."', add
label define related_lbl 6000 `"Other relative or non-relative"', add
label define related_lbl 9999 `"Unknown"', add
label values related related_lbl

label define age_lbl 000 `"Less than 1 year"'
label define age_lbl 001 `"1 year"', add
label define age_lbl 002 `"2 years"', add
label define age_lbl 003 `"3"', add
label define age_lbl 004 `"4"', add
label define age_lbl 005 `"5"', add
label define age_lbl 006 `"6"', add
label define age_lbl 007 `"7"', add
label define age_lbl 008 `"8"', add
label define age_lbl 009 `"9"', add
label define age_lbl 010 `"10"', add
label define age_lbl 011 `"11"', add
label define age_lbl 012 `"12"', add
label define age_lbl 013 `"13"', add
label define age_lbl 014 `"14"', add
label define age_lbl 015 `"15"', add
label define age_lbl 016 `"16"', add
label define age_lbl 017 `"17"', add
label define age_lbl 018 `"18"', add
label define age_lbl 019 `"19"', add
label define age_lbl 020 `"20"', add
label define age_lbl 021 `"21"', add
label define age_lbl 022 `"22"', add
label define age_lbl 023 `"23"', add
label define age_lbl 024 `"24"', add
label define age_lbl 025 `"25"', add
label define age_lbl 026 `"26"', add
label define age_lbl 027 `"27"', add
label define age_lbl 028 `"28"', add
label define age_lbl 029 `"29"', add
label define age_lbl 030 `"30"', add
label define age_lbl 031 `"31"', add
label define age_lbl 032 `"32"', add
label define age_lbl 033 `"33"', add
label define age_lbl 034 `"34"', add
label define age_lbl 035 `"35"', add
label define age_lbl 036 `"36"', add
label define age_lbl 037 `"37"', add
label define age_lbl 038 `"38"', add
label define age_lbl 039 `"39"', add
label define age_lbl 040 `"40"', add
label define age_lbl 041 `"41"', add
label define age_lbl 042 `"42"', add
label define age_lbl 043 `"43"', add
label define age_lbl 044 `"44"', add
label define age_lbl 045 `"45"', add
label define age_lbl 046 `"46"', add
label define age_lbl 047 `"47"', add
label define age_lbl 048 `"48"', add
label define age_lbl 049 `"49"', add
label define age_lbl 050 `"50"', add
label define age_lbl 051 `"51"', add
label define age_lbl 052 `"52"', add
label define age_lbl 053 `"53"', add
label define age_lbl 054 `"54"', add
label define age_lbl 055 `"55"', add
label define age_lbl 056 `"56"', add
label define age_lbl 057 `"57"', add
label define age_lbl 058 `"58"', add
label define age_lbl 059 `"59"', add
label define age_lbl 060 `"60"', add
label define age_lbl 061 `"61"', add
label define age_lbl 062 `"62"', add
label define age_lbl 063 `"63"', add
label define age_lbl 064 `"64"', add
label define age_lbl 065 `"65"', add
label define age_lbl 066 `"66"', add
label define age_lbl 067 `"67"', add
label define age_lbl 068 `"68"', add
label define age_lbl 069 `"69"', add
label define age_lbl 070 `"70"', add
label define age_lbl 071 `"71"', add
label define age_lbl 072 `"72"', add
label define age_lbl 073 `"73"', add
label define age_lbl 074 `"74"', add
label define age_lbl 075 `"75"', add
label define age_lbl 076 `"76"', add
label define age_lbl 077 `"77"', add
label define age_lbl 078 `"78"', add
label define age_lbl 079 `"79"', add
label define age_lbl 080 `"80"', add
label define age_lbl 081 `"81"', add
label define age_lbl 082 `"82"', add
label define age_lbl 083 `"83"', add
label define age_lbl 084 `"84"', add
label define age_lbl 085 `"85"', add
label define age_lbl 086 `"86"', add
label define age_lbl 087 `"87"', add
label define age_lbl 088 `"88"', add
label define age_lbl 089 `"89"', add
label define age_lbl 090 `"90"', add
label define age_lbl 091 `"91"', add
label define age_lbl 092 `"92"', add
label define age_lbl 093 `"93"', add
label define age_lbl 094 `"94"', add
label define age_lbl 095 `"95"', add
label define age_lbl 096 `"96"', add
label define age_lbl 097 `"97"', add
label define age_lbl 098 `"98"', add
label define age_lbl 099 `"99"', add
label define age_lbl 100 `"100+"', add
label define age_lbl 999 `"Not reported/missing"', add
label values age age_lbl

label define age2_lbl 01 `"0 to 4"'
label define age2_lbl 02 `"5 to 9"', add
label define age2_lbl 03 `"10 to 14"', add
label define age2_lbl 04 `"15 to 19"', add
label define age2_lbl 05 `"0 to 5"', add
label define age2_lbl 06 `"6 to 10"', add
label define age2_lbl 07 `"10 to 15"', add
label define age2_lbl 08 `"11 to 14"', add
label define age2_lbl 09 `"15 to 17"', add
label define age2_lbl 10 `"16 to 19"', add
label define age2_lbl 11 `"18 to 24"', add
label define age2_lbl 12 `"20 to 24"', add
label define age2_lbl 13 `"25 to 29"', add
label define age2_lbl 14 `"30 to 34"', add
label define age2_lbl 15 `"35 to 39"', add
label define age2_lbl 16 `"40 to 44"', add
label define age2_lbl 17 `"45 to 49"', add
label define age2_lbl 18 `"50 to 54"', add
label define age2_lbl 19 `"55 to 59"', add
label define age2_lbl 20 `"60 to 64"', add
label define age2_lbl 21 `"65 to 69"', add
label define age2_lbl 22 `"70 to 74"', add
label define age2_lbl 23 `"75 to 79"', add
label define age2_lbl 24 `"80 to 84"', add
label define age2_lbl 25 `"85+"', add
label define age2_lbl 98 `"Unknown"', add
label values age2 age2_lbl

label define sex_lbl 1 `"Male"'
label define sex_lbl 2 `"Female"', add
label define sex_lbl 9 `"Unknown"', add
label values sex sex_lbl

label define marst_lbl 0 `"NIU (not in universe)"'
label define marst_lbl 1 `"Single/never married"', add
label define marst_lbl 2 `"Married/in union"', add
label define marst_lbl 3 `"Separated/divorced/spouse absent"', add
label define marst_lbl 4 `"Widowed"', add
label define marst_lbl 9 `"Unknown/missing"', add
label values marst marst_lbl

label define marstd_lbl 000 `"NIU (not in universe)"'
label define marstd_lbl 100 `"Single/never married"', add
label define marstd_lbl 110 `"Engaged"', add
label define marstd_lbl 111 `"Never married and never cohabited"', add
label define marstd_lbl 200 `"Married or consensual union"', add
label define marstd_lbl 210 `"Married, formally"', add
label define marstd_lbl 211 `"Married, civil"', add
label define marstd_lbl 212 `"Married, religious"', add
label define marstd_lbl 213 `"Married, civil and religious"', add
label define marstd_lbl 214 `"Married, civil or religious"', add
label define marstd_lbl 215 `"Married, traditional/customary"', add
label define marstd_lbl 216 `"Married, monogamous"', add
label define marstd_lbl 217 `"Married, polygamous"', add
label define marstd_lbl 219 `"Married, spouse absent (historical samples)"', add
label define marstd_lbl 220 `"Consensual union"', add
label define marstd_lbl 300 `"Separated/divorced/spouse absent"', add
label define marstd_lbl 310 `"Separated or divorced"', add
label define marstd_lbl 320 `"Separated or annulled"', add
label define marstd_lbl 330 `"Separated"', add
label define marstd_lbl 331 `"Separated legally"', add
label define marstd_lbl 332 `"Separated de facto"', add
label define marstd_lbl 333 `"Separated from marriage"', add
label define marstd_lbl 334 `"Separated from consensual union"', add
label define marstd_lbl 335 `"Separated from consensual union or marriage"', add
label define marstd_lbl 340 `"Annulled"', add
label define marstd_lbl 350 `"Divorced"', add
label define marstd_lbl 400 `"Widowed"', add
label define marstd_lbl 410 `"Widowed or divorced"', add
label define marstd_lbl 411 `"Widowed from consensual union or marriage"', add
label define marstd_lbl 412 `"Widowed from marriage"', add
label define marstd_lbl 413 `"Widowed from consensual union"', add
label define marstd_lbl 420 `"Widowed, divorced, or separated"', add
label define marstd_lbl 999 `"Unknown/missing"', add
label values marstd marstd_lbl

label define birthyr_lbl 0000 `"NIU (not in universe)"'
label define birthyr_lbl 1628 `"1628"', add
label define birthyr_lbl 1629 `"1629"', add
label define birthyr_lbl 1630 `"1630"', add
label define birthyr_lbl 1631 `"1631"', add
label define birthyr_lbl 1634 `"1634"', add
label define birthyr_lbl 1635 `"1635"', add
label define birthyr_lbl 1636 `"1636"', add
label define birthyr_lbl 1637 `"1637"', add
label define birthyr_lbl 1638 `"1638"', add
label define birthyr_lbl 1639 `"1639"', add
label define birthyr_lbl 1640 `"1640"', add
label define birthyr_lbl 1641 `"1641"', add
label define birthyr_lbl 1642 `"1642"', add
label define birthyr_lbl 1643 `"1643"', add
label define birthyr_lbl 1644 `"1644"', add
label define birthyr_lbl 1645 `"1645"', add
label define birthyr_lbl 1646 `"1646"', add
label define birthyr_lbl 1647 `"1647"', add
label define birthyr_lbl 1648 `"1648"', add
label define birthyr_lbl 1649 `"1649"', add
label define birthyr_lbl 1650 `"1650"', add
label define birthyr_lbl 1651 `"1651"', add
label define birthyr_lbl 1652 `"1652"', add
label define birthyr_lbl 1653 `"1653"', add
label define birthyr_lbl 1654 `"1654"', add
label define birthyr_lbl 1655 `"1655"', add
label define birthyr_lbl 1656 `"1656"', add
label define birthyr_lbl 1657 `"1657"', add
label define birthyr_lbl 1658 `"1658"', add
label define birthyr_lbl 1659 `"1659"', add
label define birthyr_lbl 1660 `"1660"', add
label define birthyr_lbl 1661 `"1661"', add
label define birthyr_lbl 1662 `"1662"', add
label define birthyr_lbl 1663 `"1663"', add
label define birthyr_lbl 1664 `"1664"', add
label define birthyr_lbl 1665 `"1665"', add
label define birthyr_lbl 1666 `"1666"', add
label define birthyr_lbl 1667 `"1667"', add
label define birthyr_lbl 1668 `"1668"', add
label define birthyr_lbl 1669 `"1669"', add
label define birthyr_lbl 1670 `"1670"', add
label define birthyr_lbl 1671 `"1671"', add
label define birthyr_lbl 1672 `"1672"', add
label define birthyr_lbl 1673 `"1673"', add
label define birthyr_lbl 1674 `"1674"', add
label define birthyr_lbl 1675 `"1675"', add
label define birthyr_lbl 1676 `"1676"', add
label define birthyr_lbl 1677 `"1677"', add
label define birthyr_lbl 1678 `"1678"', add
label define birthyr_lbl 1679 `"1679"', add
label define birthyr_lbl 1680 `"1680"', add
label define birthyr_lbl 1681 `"1681"', add
label define birthyr_lbl 1682 `"1682"', add
label define birthyr_lbl 1683 `"1683"', add
label define birthyr_lbl 1684 `"1684"', add
label define birthyr_lbl 1685 `"1685"', add
label define birthyr_lbl 1686 `"1686"', add
label define birthyr_lbl 1687 `"1687"', add
label define birthyr_lbl 1688 `"1688"', add
label define birthyr_lbl 1689 `"1689"', add
label define birthyr_lbl 1690 `"1690"', add
label define birthyr_lbl 1691 `"1691"', add
label define birthyr_lbl 1692 `"1692"', add
label define birthyr_lbl 1693 `"1693"', add
label define birthyr_lbl 1694 `"1694"', add
label define birthyr_lbl 1695 `"1695"', add
label define birthyr_lbl 1696 `"1696"', add
label define birthyr_lbl 1697 `"1697"', add
label define birthyr_lbl 1698 `"1698"', add
label define birthyr_lbl 1699 `"1699"', add
label define birthyr_lbl 1700 `"1700"', add
label define birthyr_lbl 1701 `"1701"', add
label define birthyr_lbl 1702 `"1702"', add
label define birthyr_lbl 1703 `"1703"', add
label define birthyr_lbl 1704 `"1704"', add
label define birthyr_lbl 1705 `"1705"', add
label define birthyr_lbl 1706 `"1706"', add
label define birthyr_lbl 1707 `"1707"', add
label define birthyr_lbl 1708 `"1708"', add
label define birthyr_lbl 1709 `"1709"', add
label define birthyr_lbl 1710 `"1710"', add
label define birthyr_lbl 1711 `"1711"', add
label define birthyr_lbl 1712 `"1712"', add
label define birthyr_lbl 1713 `"1713"', add
label define birthyr_lbl 1714 `"1714"', add
label define birthyr_lbl 1715 `"1715"', add
label define birthyr_lbl 1716 `"1716"', add
label define birthyr_lbl 1717 `"1717"', add
label define birthyr_lbl 1718 `"1718"', add
label define birthyr_lbl 1719 `"1719"', add
label define birthyr_lbl 1720 `"1720"', add
label define birthyr_lbl 1721 `"1721"', add
label define birthyr_lbl 1722 `"1722"', add
label define birthyr_lbl 1723 `"1723"', add
label define birthyr_lbl 1724 `"1724"', add
label define birthyr_lbl 1725 `"1725"', add
label define birthyr_lbl 1726 `"1726"', add
label define birthyr_lbl 1727 `"1727"', add
label define birthyr_lbl 1728 `"1728"', add
label define birthyr_lbl 1729 `"1729"', add
label define birthyr_lbl 1730 `"1730"', add
label define birthyr_lbl 1731 `"1731"', add
label define birthyr_lbl 1732 `"1732"', add
label define birthyr_lbl 1733 `"1733"', add
label define birthyr_lbl 1734 `"1734"', add
label define birthyr_lbl 1735 `"1735"', add
label define birthyr_lbl 1736 `"1736"', add
label define birthyr_lbl 1737 `"1737"', add
label define birthyr_lbl 1738 `"1738"', add
label define birthyr_lbl 1739 `"1739"', add
label define birthyr_lbl 1740 `"1740"', add
label define birthyr_lbl 1741 `"1741"', add
label define birthyr_lbl 1742 `"1742"', add
label define birthyr_lbl 1743 `"1743"', add
label define birthyr_lbl 1744 `"1744"', add
label define birthyr_lbl 1745 `"1745"', add
label define birthyr_lbl 1746 `"1746"', add
label define birthyr_lbl 1747 `"1747"', add
label define birthyr_lbl 1748 `"1748"', add
label define birthyr_lbl 1749 `"1749"', add
label define birthyr_lbl 1750 `"1750"', add
label define birthyr_lbl 1751 `"1751"', add
label define birthyr_lbl 1752 `"1752"', add
label define birthyr_lbl 1753 `"1753"', add
label define birthyr_lbl 1754 `"1754"', add
label define birthyr_lbl 1755 `"1755"', add
label define birthyr_lbl 1756 `"1756"', add
label define birthyr_lbl 1757 `"1757"', add
label define birthyr_lbl 1758 `"1758"', add
label define birthyr_lbl 1759 `"1759"', add
label define birthyr_lbl 1760 `"1760"', add
label define birthyr_lbl 1761 `"1761"', add
label define birthyr_lbl 1762 `"1762"', add
label define birthyr_lbl 1763 `"1763"', add
label define birthyr_lbl 1764 `"1764"', add
label define birthyr_lbl 1765 `"1765"', add
label define birthyr_lbl 1766 `"1766"', add
label define birthyr_lbl 1767 `"1767"', add
label define birthyr_lbl 1768 `"1768"', add
label define birthyr_lbl 1769 `"1769"', add
label define birthyr_lbl 1770 `"1770"', add
label define birthyr_lbl 1771 `"1771"', add
label define birthyr_lbl 1772 `"1772"', add
label define birthyr_lbl 1773 `"1773"', add
label define birthyr_lbl 1774 `"1774"', add
label define birthyr_lbl 1775 `"1775"', add
label define birthyr_lbl 1776 `"1776"', add
label define birthyr_lbl 1777 `"1777"', add
label define birthyr_lbl 1778 `"1778"', add
label define birthyr_lbl 1779 `"1779"', add
label define birthyr_lbl 1780 `"1780"', add
label define birthyr_lbl 1781 `"1781"', add
label define birthyr_lbl 1782 `"1782"', add
label define birthyr_lbl 1783 `"1783"', add
label define birthyr_lbl 1784 `"1784"', add
label define birthyr_lbl 1785 `"1785"', add
label define birthyr_lbl 1786 `"1786"', add
label define birthyr_lbl 1787 `"1787"', add
label define birthyr_lbl 1788 `"1788"', add
label define birthyr_lbl 1789 `"1789"', add
label define birthyr_lbl 1790 `"1790"', add
label define birthyr_lbl 1791 `"1791"', add
label define birthyr_lbl 1792 `"1792"', add
label define birthyr_lbl 1793 `"1793"', add
label define birthyr_lbl 1794 `"1794"', add
label define birthyr_lbl 1795 `"1795"', add
label define birthyr_lbl 1796 `"1796"', add
label define birthyr_lbl 1797 `"1797"', add
label define birthyr_lbl 1798 `"1798"', add
label define birthyr_lbl 1799 `"1799"', add
label define birthyr_lbl 1800 `"1800"', add
label define birthyr_lbl 1801 `"1801"', add
label define birthyr_lbl 1802 `"1802"', add
label define birthyr_lbl 1803 `"1803"', add
label define birthyr_lbl 1804 `"1804"', add
label define birthyr_lbl 1805 `"1805"', add
label define birthyr_lbl 1806 `"1806"', add
label define birthyr_lbl 1807 `"1807"', add
label define birthyr_lbl 1808 `"1808"', add
label define birthyr_lbl 1809 `"1809"', add
label define birthyr_lbl 1810 `"1810"', add
label define birthyr_lbl 1811 `"1811"', add
label define birthyr_lbl 1812 `"1812"', add
label define birthyr_lbl 1813 `"1813"', add
label define birthyr_lbl 1814 `"1814"', add
label define birthyr_lbl 1815 `"1815"', add
label define birthyr_lbl 1816 `"1816"', add
label define birthyr_lbl 1817 `"1817"', add
label define birthyr_lbl 1818 `"1818"', add
label define birthyr_lbl 1819 `"1819"', add
label define birthyr_lbl 1820 `"1820"', add
label define birthyr_lbl 1821 `"1821"', add
label define birthyr_lbl 1822 `"1822"', add
label define birthyr_lbl 1823 `"1823"', add
label define birthyr_lbl 1824 `"1824"', add
label define birthyr_lbl 1825 `"1825"', add
label define birthyr_lbl 1826 `"1826"', add
label define birthyr_lbl 1827 `"1827"', add
label define birthyr_lbl 1828 `"1828"', add
label define birthyr_lbl 1829 `"1829"', add
label define birthyr_lbl 1830 `"1830"', add
label define birthyr_lbl 1831 `"1831"', add
label define birthyr_lbl 1832 `"1832"', add
label define birthyr_lbl 1833 `"1833"', add
label define birthyr_lbl 1834 `"1834"', add
label define birthyr_lbl 1835 `"1835"', add
label define birthyr_lbl 1836 `"1836"', add
label define birthyr_lbl 1837 `"1837"', add
label define birthyr_lbl 1838 `"1838"', add
label define birthyr_lbl 1839 `"1839"', add
label define birthyr_lbl 1840 `"1840"', add
label define birthyr_lbl 1841 `"1841"', add
label define birthyr_lbl 1842 `"1842"', add
label define birthyr_lbl 1843 `"1843"', add
label define birthyr_lbl 1844 `"1844"', add
label define birthyr_lbl 1845 `"1845"', add
label define birthyr_lbl 1846 `"1846"', add
label define birthyr_lbl 1847 `"1847"', add
label define birthyr_lbl 1848 `"1848"', add
label define birthyr_lbl 1849 `"1849"', add
label define birthyr_lbl 1850 `"1850"', add
label define birthyr_lbl 1851 `"1851"', add
label define birthyr_lbl 1852 `"1852"', add
label define birthyr_lbl 1853 `"1853"', add
label define birthyr_lbl 1854 `"1854"', add
label define birthyr_lbl 1855 `"1855"', add
label define birthyr_lbl 1856 `"1856"', add
label define birthyr_lbl 1857 `"1857"', add
label define birthyr_lbl 1858 `"1858"', add
label define birthyr_lbl 1859 `"1859"', add
label define birthyr_lbl 1860 `"1860"', add
label define birthyr_lbl 1861 `"1861"', add
label define birthyr_lbl 1862 `"1862"', add
label define birthyr_lbl 1863 `"1863"', add
label define birthyr_lbl 1864 `"1864"', add
label define birthyr_lbl 1865 `"1865"', add
label define birthyr_lbl 1866 `"1866"', add
label define birthyr_lbl 1867 `"1867"', add
label define birthyr_lbl 1868 `"1868"', add
label define birthyr_lbl 1869 `"1869"', add
label define birthyr_lbl 1870 `"1870"', add
label define birthyr_lbl 1871 `"1871"', add
label define birthyr_lbl 1872 `"1872"', add
label define birthyr_lbl 1873 `"1873"', add
label define birthyr_lbl 1874 `"1874"', add
label define birthyr_lbl 1875 `"1875"', add
label define birthyr_lbl 1876 `"1876"', add
label define birthyr_lbl 1877 `"1877"', add
label define birthyr_lbl 1878 `"1878"', add
label define birthyr_lbl 1879 `"1879"', add
label define birthyr_lbl 1880 `"1880"', add
label define birthyr_lbl 1881 `"1881"', add
label define birthyr_lbl 1882 `"1882"', add
label define birthyr_lbl 1883 `"1883"', add
label define birthyr_lbl 1884 `"1884"', add
label define birthyr_lbl 1885 `"1885"', add
label define birthyr_lbl 1886 `"1886"', add
label define birthyr_lbl 1887 `"1887"', add
label define birthyr_lbl 1888 `"1888"', add
label define birthyr_lbl 1889 `"1889"', add
label define birthyr_lbl 1890 `"1890"', add
label define birthyr_lbl 1891 `"1891"', add
label define birthyr_lbl 1892 `"1892"', add
label define birthyr_lbl 1893 `"1893"', add
label define birthyr_lbl 1894 `"1894"', add
label define birthyr_lbl 1895 `"1895"', add
label define birthyr_lbl 1896 `"1896"', add
label define birthyr_lbl 1897 `"1897"', add
label define birthyr_lbl 1898 `"1898"', add
label define birthyr_lbl 1899 `"1899"', add
label define birthyr_lbl 1900 `"1900"', add
label define birthyr_lbl 1901 `"1901"', add
label define birthyr_lbl 1902 `"1902"', add
label define birthyr_lbl 1903 `"1903"', add
label define birthyr_lbl 1904 `"1904"', add
label define birthyr_lbl 1905 `"1905"', add
label define birthyr_lbl 1906 `"1906"', add
label define birthyr_lbl 1907 `"1907"', add
label define birthyr_lbl 1908 `"1908"', add
label define birthyr_lbl 1909 `"1909"', add
label define birthyr_lbl 1910 `"1910"', add
label define birthyr_lbl 1911 `"1911"', add
label define birthyr_lbl 1912 `"1912"', add
label define birthyr_lbl 1913 `"1913"', add
label define birthyr_lbl 1914 `"1914"', add
label define birthyr_lbl 1915 `"1915"', add
label define birthyr_lbl 1916 `"1916"', add
label define birthyr_lbl 1917 `"1917"', add
label define birthyr_lbl 1918 `"1918"', add
label define birthyr_lbl 1919 `"1919"', add
label define birthyr_lbl 1920 `"1920"', add
label define birthyr_lbl 1921 `"1921"', add
label define birthyr_lbl 1922 `"1922"', add
label define birthyr_lbl 1923 `"1923"', add
label define birthyr_lbl 1924 `"1924"', add
label define birthyr_lbl 1925 `"1925"', add
label define birthyr_lbl 1926 `"1926"', add
label define birthyr_lbl 1927 `"1927"', add
label define birthyr_lbl 1928 `"1928"', add
label define birthyr_lbl 1929 `"1929"', add
label define birthyr_lbl 1930 `"1930"', add
label define birthyr_lbl 1931 `"1931"', add
label define birthyr_lbl 1932 `"1932"', add
label define birthyr_lbl 1933 `"1933"', add
label define birthyr_lbl 1934 `"1934"', add
label define birthyr_lbl 1935 `"1935"', add
label define birthyr_lbl 1936 `"1936"', add
label define birthyr_lbl 1937 `"1937"', add
label define birthyr_lbl 1938 `"1938"', add
label define birthyr_lbl 1939 `"1939"', add
label define birthyr_lbl 1940 `"1940"', add
label define birthyr_lbl 1941 `"1941"', add
label define birthyr_lbl 1942 `"1942"', add
label define birthyr_lbl 1943 `"1943"', add
label define birthyr_lbl 1944 `"1944"', add
label define birthyr_lbl 1945 `"1945"', add
label define birthyr_lbl 1946 `"1946"', add
label define birthyr_lbl 1947 `"1947"', add
label define birthyr_lbl 1948 `"1948"', add
label define birthyr_lbl 1949 `"1949"', add
label define birthyr_lbl 1950 `"1950"', add
label define birthyr_lbl 1951 `"1951"', add
label define birthyr_lbl 1952 `"1952"', add
label define birthyr_lbl 1953 `"1953"', add
label define birthyr_lbl 1954 `"1954"', add
label define birthyr_lbl 1955 `"1955"', add
label define birthyr_lbl 1956 `"1956"', add
label define birthyr_lbl 1957 `"1957"', add
label define birthyr_lbl 1958 `"1958"', add
label define birthyr_lbl 1959 `"1959"', add
label define birthyr_lbl 1960 `"1960"', add
label define birthyr_lbl 1961 `"1961"', add
label define birthyr_lbl 1962 `"1962"', add
label define birthyr_lbl 1963 `"1963"', add
label define birthyr_lbl 1964 `"1964"', add
label define birthyr_lbl 1965 `"1965"', add
label define birthyr_lbl 1966 `"1966"', add
label define birthyr_lbl 1967 `"1967"', add
label define birthyr_lbl 1968 `"1968"', add
label define birthyr_lbl 1969 `"1969"', add
label define birthyr_lbl 1970 `"1970"', add
label define birthyr_lbl 1971 `"1971"', add
label define birthyr_lbl 1972 `"1972"', add
label define birthyr_lbl 1973 `"1973"', add
label define birthyr_lbl 1974 `"1974"', add
label define birthyr_lbl 1975 `"1975"', add
label define birthyr_lbl 1976 `"1976"', add
label define birthyr_lbl 1977 `"1977"', add
label define birthyr_lbl 1978 `"1978"', add
label define birthyr_lbl 1979 `"1979"', add
label define birthyr_lbl 1980 `"1980"', add
label define birthyr_lbl 1981 `"1981"', add
label define birthyr_lbl 1982 `"1982"', add
label define birthyr_lbl 1983 `"1983"', add
label define birthyr_lbl 1984 `"1984"', add
label define birthyr_lbl 1985 `"1985"', add
label define birthyr_lbl 1986 `"1986"', add
label define birthyr_lbl 1987 `"1987"', add
label define birthyr_lbl 1988 `"1988"', add
label define birthyr_lbl 1989 `"1989"', add
label define birthyr_lbl 1990 `"1990"', add
label define birthyr_lbl 1991 `"1991"', add
label define birthyr_lbl 1992 `"1992"', add
label define birthyr_lbl 1993 `"1993"', add
label define birthyr_lbl 1994 `"1994"', add
label define birthyr_lbl 1995 `"1995"', add
label define birthyr_lbl 1996 `"1996"', add
label define birthyr_lbl 1997 `"1997"', add
label define birthyr_lbl 1998 `"1998"', add
label define birthyr_lbl 1999 `"1999"', add
label define birthyr_lbl 2000 `"2000"', add
label define birthyr_lbl 2001 `"2001"', add
label define birthyr_lbl 2002 `"2002"', add
label define birthyr_lbl 2003 `"2003"', add
label define birthyr_lbl 2004 `"2004"', add
label define birthyr_lbl 2005 `"2005"', add
label define birthyr_lbl 2006 `"2006"', add
label define birthyr_lbl 2007 `"2007"', add
label define birthyr_lbl 2008 `"2008"', add
label define birthyr_lbl 2009 `"2009"', add
label define birthyr_lbl 2010 `"2010"', add
label define birthyr_lbl 2011 `"2011"', add
label define birthyr_lbl 2012 `"2012"', add
label define birthyr_lbl 2013 `"2013"', add
label define birthyr_lbl 2014 `"2014"', add
label define birthyr_lbl 2015 `"2015"', add
label define birthyr_lbl 2016 `"2016"', add
label define birthyr_lbl 2017 `"2017"', add
label define birthyr_lbl 2018 `"2018"', add
label define birthyr_lbl 2019 `"2019"', add
label define birthyr_lbl 2020 `"2020"', add
label define birthyr_lbl 9999 `"Unknown"', add
label values birthyr birthyr_lbl

label define birthmo_lbl 01 `"January"'
label define birthmo_lbl 02 `"February"', add
label define birthmo_lbl 03 `"March"', add
label define birthmo_lbl 04 `"April"', add
label define birthmo_lbl 05 `"May"', add
label define birthmo_lbl 06 `"June"', add
label define birthmo_lbl 07 `"July"', add
label define birthmo_lbl 08 `"August"', add
label define birthmo_lbl 09 `"September"', add
label define birthmo_lbl 10 `"October"', add
label define birthmo_lbl 11 `"November"', add
label define birthmo_lbl 12 `"December"', add
label define birthmo_lbl 98 `"Unknown"', add
label define birthmo_lbl 99 `"NIU (not in universe)"', add
label values birthmo birthmo_lbl

label define nativity_lbl 0 `"NIU (not in universe)"'
label define nativity_lbl 1 `"Native-born"', add
label define nativity_lbl 2 `"Foreign-born"', add
label define nativity_lbl 9 `"Unknown/missing"', add
label values nativity nativity_lbl

label define citizen_lbl 1 `"Citizen, not specified"'
label define citizen_lbl 2 `"Citizen by birth"', add
label define citizen_lbl 3 `"Naturalized citizen"', add
label define citizen_lbl 4 `"Not a citizen"', add
label define citizen_lbl 5 `"Without citizenship, stateless"', add
label define citizen_lbl 8 `"Unknown"', add
label define citizen_lbl 9 `"NIU (not in universe)"', add
label values citizen citizen_lbl

label define lit_lbl 0 `"NIU (not in universe)"'
label define lit_lbl 1 `"No, illiterate"', add
label define lit_lbl 2 `"Yes, literate"', add
label define lit_lbl 9 `"Unknown/missing"', add
label values lit lit_lbl

label define edattain_lbl 0 `"NIU (not in universe)"'
label define edattain_lbl 1 `"Less than primary completed"', add
label define edattain_lbl 2 `"Primary completed"', add
label define edattain_lbl 3 `"Secondary completed"', add
label define edattain_lbl 4 `"University completed"', add
label define edattain_lbl 9 `"Unknown"', add
label values edattain edattain_lbl

label define edattaind_lbl 000 `"NIU (not in universe)"'
label define edattaind_lbl 100 `"Less than primary completed (n.s.)"', add
label define edattaind_lbl 110 `"No schooling"', add
label define edattaind_lbl 120 `"Some primary completed"', add
label define edattaind_lbl 130 `"Primary (4 yrs) completed"', add
label define edattaind_lbl 211 `"Primary (5 yrs) completed"', add
label define edattaind_lbl 212 `"Primary (6 yrs) completed"', add
label define edattaind_lbl 221 `"Lower secondary general completed"', add
label define edattaind_lbl 222 `"Lower secondary technical completed"', add
label define edattaind_lbl 311 `"Secondary, general track completed"', add
label define edattaind_lbl 312 `"Some college completed"', add
label define edattaind_lbl 320 `"Secondary or post-secondary technical completed"', add
label define edattaind_lbl 321 `"Secondary, technical track completed"', add
label define edattaind_lbl 322 `"Post-secondary technical education"', add
label define edattaind_lbl 400 `"University completed"', add
label define edattaind_lbl 999 `"Unknown/missing"', add
label values edattaind edattaind_lbl

label define yrschool_lbl 00 `"None or pre-school"'
label define yrschool_lbl 01 `"1 year"', add
label define yrschool_lbl 02 `"2 years"', add
label define yrschool_lbl 03 `"3 years"', add
label define yrschool_lbl 04 `"4 years"', add
label define yrschool_lbl 05 `"5 years"', add
label define yrschool_lbl 06 `"6 years"', add
label define yrschool_lbl 07 `"7 years"', add
label define yrschool_lbl 08 `"8 years"', add
label define yrschool_lbl 09 `"9 years"', add
label define yrschool_lbl 10 `"10 years"', add
label define yrschool_lbl 11 `"11 years"', add
label define yrschool_lbl 12 `"12 years"', add
label define yrschool_lbl 13 `"13 years"', add
label define yrschool_lbl 14 `"14 years"', add
label define yrschool_lbl 15 `"15 years"', add
label define yrschool_lbl 16 `"16 years"', add
label define yrschool_lbl 17 `"17 years"', add
label define yrschool_lbl 18 `"18 years or more"', add
label define yrschool_lbl 90 `"Not specified"', add
label define yrschool_lbl 91 `"Some primary"', add
label define yrschool_lbl 92 `"Some technical after primary"', add
label define yrschool_lbl 93 `"Some secondary"', add
label define yrschool_lbl 94 `"Some tertiary"', add
label define yrschool_lbl 95 `"Adult literacy"', add
label define yrschool_lbl 96 `"Special education"', add
label define yrschool_lbl 98 `"Unknown/missing"', add
label define yrschool_lbl 99 `"NIU (not in universe)"', add
label values yrschool yrschool_lbl

label define educma_lbl 100 `"None"'
label define educma_lbl 110 `"Preschool"', add
label define educma_lbl 200 `"Koranic school"', add
label define educma_lbl 300 `"Primary education (5 years)"', add
label define educma_lbl 301 `"Primary (5 years), grade 1"', add
label define educma_lbl 302 `"Primary (5 years), grade 2"', add
label define educma_lbl 303 `"Primary (5 years), grade 3"', add
label define educma_lbl 304 `"Primary (5 years), grade 4"', add
label define educma_lbl 305 `"Primary (5 years), grade 5"', add
label define educma_lbl 306 `"Primary (5 years), grade unknown"', add
label define educma_lbl 310 `"Basic education (9 years)"', add
label define educma_lbl 311 `"Basic (9 years), grade 1"', add
label define educma_lbl 312 `"Basic (9 years), grade 2"', add
label define educma_lbl 313 `"Basic (9 years), grade 3"', add
label define educma_lbl 314 `"Basic (9 years), grade 4"', add
label define educma_lbl 315 `"Basic (9 years), grade 5"', add
label define educma_lbl 316 `"Basic (9 years), grade 6"', add
label define educma_lbl 317 `"Basic (9 years), grade 7"', add
label define educma_lbl 318 `"Basic (9 years), grade 8"', add
label define educma_lbl 319 `"Basic (9 years), grade 9"', add
label define educma_lbl 320 `"Basic (9 years), grade unknown"', add
label define educma_lbl 400 `"Secondary education (7 years)"', add
label define educma_lbl 401 `"Secondary (7 years), grade 1"', add
label define educma_lbl 402 `"Secondary (7 years), grade 2"', add
label define educma_lbl 403 `"Secondary (7 years), grade 3"', add
label define educma_lbl 404 `"Secondary (7 years), grade 4"', add
label define educma_lbl 405 `"Secondary (7 years), grade 5"', add
label define educma_lbl 406 `"Secondary (7 years), grade 6"', add
label define educma_lbl 407 `"Secondary (7 years), grade 7"', add
label define educma_lbl 408 `"Secondary (7 years), grade unknown"', add
label define educma_lbl 410 `"Secondary education (3 years)"', add
label define educma_lbl 411 `"Secondary (3 years), grade 1"', add
label define educma_lbl 412 `"Secondary (3 years), grade 2"', add
label define educma_lbl 413 `"Secondary (3 years), grade 3"', add
label define educma_lbl 414 `"Secondary (3 years), grade unknown"', add
label define educma_lbl 500 `"Higher education"', add
label define educma_lbl 501 `"Higher, year 1"', add
label define educma_lbl 502 `"Higher, year 2"', add
label define educma_lbl 503 `"Higher, year 3"', add
label define educma_lbl 504 `"Higher, year 4"', add
label define educma_lbl 505 `"Higher, year 5"', add
label define educma_lbl 506 `"Higher, year 6"', add
label define educma_lbl 507 `"Higher, year 7"', add
label define educma_lbl 508 `"Higher, year 8"', add
label define educma_lbl 509 `"Higher, year 9"', add
label define educma_lbl 510 `"Higher education, year unknown"', add
label define educma_lbl 998 `"Unknown"', add
label values educma educma_lbl

label define migyrs1_lbl 00 `"Less than 1 year"'
label define migyrs1_lbl 01 `"1 year (or 1 year or less)"', add
label define migyrs1_lbl 02 `"2 years"', add
label define migyrs1_lbl 03 `"3"', add
label define migyrs1_lbl 04 `"4"', add
label define migyrs1_lbl 05 `"5"', add
label define migyrs1_lbl 06 `"6"', add
label define migyrs1_lbl 07 `"7"', add
label define migyrs1_lbl 08 `"8"', add
label define migyrs1_lbl 09 `"9"', add
label define migyrs1_lbl 10 `"10"', add
label define migyrs1_lbl 11 `"11"', add
label define migyrs1_lbl 12 `"12"', add
label define migyrs1_lbl 13 `"13"', add
label define migyrs1_lbl 14 `"14"', add
label define migyrs1_lbl 15 `"15"', add
label define migyrs1_lbl 16 `"16"', add
label define migyrs1_lbl 17 `"17"', add
label define migyrs1_lbl 18 `"18"', add
label define migyrs1_lbl 19 `"19"', add
label define migyrs1_lbl 20 `"20"', add
label define migyrs1_lbl 21 `"21"', add
label define migyrs1_lbl 22 `"22"', add
label define migyrs1_lbl 23 `"23"', add
label define migyrs1_lbl 24 `"24"', add
label define migyrs1_lbl 25 `"25"', add
label define migyrs1_lbl 26 `"26"', add
label define migyrs1_lbl 27 `"27"', add
label define migyrs1_lbl 28 `"28"', add
label define migyrs1_lbl 29 `"29"', add
label define migyrs1_lbl 30 `"30"', add
label define migyrs1_lbl 31 `"31"', add
label define migyrs1_lbl 32 `"32"', add
label define migyrs1_lbl 33 `"33"', add
label define migyrs1_lbl 34 `"34"', add
label define migyrs1_lbl 35 `"35"', add
label define migyrs1_lbl 36 `"36"', add
label define migyrs1_lbl 37 `"37"', add
label define migyrs1_lbl 38 `"38"', add
label define migyrs1_lbl 39 `"39"', add
label define migyrs1_lbl 40 `"40"', add
label define migyrs1_lbl 41 `"41"', add
label define migyrs1_lbl 42 `"42"', add
label define migyrs1_lbl 43 `"43"', add
label define migyrs1_lbl 44 `"44"', add
label define migyrs1_lbl 45 `"45"', add
label define migyrs1_lbl 46 `"46"', add
label define migyrs1_lbl 47 `"47"', add
label define migyrs1_lbl 48 `"48"', add
label define migyrs1_lbl 49 `"49"', add
label define migyrs1_lbl 50 `"50"', add
label define migyrs1_lbl 51 `"51"', add
label define migyrs1_lbl 52 `"52"', add
label define migyrs1_lbl 53 `"53"', add
label define migyrs1_lbl 54 `"54"', add
label define migyrs1_lbl 55 `"55"', add
label define migyrs1_lbl 56 `"56"', add
label define migyrs1_lbl 57 `"57"', add
label define migyrs1_lbl 58 `"58"', add
label define migyrs1_lbl 59 `"59"', add
label define migyrs1_lbl 60 `"60"', add
label define migyrs1_lbl 61 `"61"', add
label define migyrs1_lbl 62 `"62"', add
label define migyrs1_lbl 63 `"63"', add
label define migyrs1_lbl 64 `"64"', add
label define migyrs1_lbl 65 `"65"', add
label define migyrs1_lbl 66 `"66"', add
label define migyrs1_lbl 67 `"67"', add
label define migyrs1_lbl 68 `"68"', add
label define migyrs1_lbl 69 `"69"', add
label define migyrs1_lbl 70 `"70"', add
label define migyrs1_lbl 71 `"71"', add
label define migyrs1_lbl 72 `"72"', add
label define migyrs1_lbl 73 `"73"', add
label define migyrs1_lbl 74 `"74"', add
label define migyrs1_lbl 75 `"75"', add
label define migyrs1_lbl 76 `"76"', add
label define migyrs1_lbl 77 `"77"', add
label define migyrs1_lbl 78 `"78"', add
label define migyrs1_lbl 79 `"79"', add
label define migyrs1_lbl 80 `"80"', add
label define migyrs1_lbl 81 `"81"', add
label define migyrs1_lbl 82 `"82"', add
label define migyrs1_lbl 83 `"83"', add
label define migyrs1_lbl 84 `"84"', add
label define migyrs1_lbl 85 `"85"', add
label define migyrs1_lbl 86 `"86"', add
label define migyrs1_lbl 87 `"87"', add
label define migyrs1_lbl 88 `"88"', add
label define migyrs1_lbl 89 `"89"', add
label define migyrs1_lbl 90 `"90"', add
label define migyrs1_lbl 91 `"91"', add
label define migyrs1_lbl 92 `"92"', add
label define migyrs1_lbl 93 `"93"', add
label define migyrs1_lbl 94 `"94"', add
label define migyrs1_lbl 95 `"95+ years"', add
label define migyrs1_lbl 96 `"Less than 5 years"', add
label define migyrs1_lbl 97 `"More than 5 years"', add
label define migyrs1_lbl 98 `"Unknown"', add
label define migyrs1_lbl 99 `"NIU (not in universe)"', add
label values migyrs1 migyrs1_lbl

label define ma1994a_resident_lbl 1 `"Resident, present"'
label define ma1994a_resident_lbl 2 `"Resident, absent"', add
label values ma1994a_resident ma1994a_resident_lbl

label define ma1994a_vitalreg_lbl 1 `"Yes"'
label define ma1994a_vitalreg_lbl 2 `"No"', add
label define ma1994a_vitalreg_lbl 8 `"Unknown"', add
label define ma1994a_vitalreg_lbl 9 `"NIU (not in universe)"', add
label values ma1994a_vitalreg ma1994a_vitalreg_lbl

label define ma1994a_bpl_lbl 0 `"Same town/village"'
label define ma1994a_bpl_lbl 1 `"Different town/village, Morocco"', add
label define ma1994a_bpl_lbl 2 `"Born abroad"', add
label define ma1994a_bpl_lbl 8 `"Unknown"', add
label define ma1994a_bpl_lbl 9 `"NIU (not in universe)"', add
label values ma1994a_bpl ma1994a_bpl_lbl

label define ma1994a_prevres_lbl 0 `"Same house (never moved)"'
label define ma1994a_prevres_lbl 1 `"Same town/village, different house"', add
label define ma1994a_prevres_lbl 2 `"Different town/village, Morocco"', add
label define ma1994a_prevres_lbl 3 `"Abroad"', add
label define ma1994a_prevres_lbl 8 `"Unknown"', add
label define ma1994a_prevres_lbl 9 `"NIU (not in universe)"', add
label values ma1994a_prevres ma1994a_prevres_lbl

label define ma1994a_durres_lbl 00 `"0"'
label define ma1994a_durres_lbl 01 `"1"', add
label define ma1994a_durres_lbl 02 `"2"', add
label define ma1994a_durres_lbl 03 `"3"', add
label define ma1994a_durres_lbl 04 `"4"', add
label define ma1994a_durres_lbl 05 `"5"', add
label define ma1994a_durres_lbl 06 `"6"', add
label define ma1994a_durres_lbl 07 `"7"', add
label define ma1994a_durres_lbl 08 `"8"', add
label define ma1994a_durres_lbl 09 `"9"', add
label define ma1994a_durres_lbl 10 `"10"', add
label define ma1994a_durres_lbl 11 `"11"', add
label define ma1994a_durres_lbl 12 `"12"', add
label define ma1994a_durres_lbl 13 `"13"', add
label define ma1994a_durres_lbl 14 `"14"', add
label define ma1994a_durres_lbl 15 `"15"', add
label define ma1994a_durres_lbl 16 `"16"', add
label define ma1994a_durres_lbl 17 `"17"', add
label define ma1994a_durres_lbl 18 `"18"', add
label define ma1994a_durres_lbl 19 `"19"', add
label define ma1994a_durres_lbl 20 `"20"', add
label define ma1994a_durres_lbl 21 `"21"', add
label define ma1994a_durres_lbl 22 `"22"', add
label define ma1994a_durres_lbl 23 `"23"', add
label define ma1994a_durres_lbl 24 `"24"', add
label define ma1994a_durres_lbl 25 `"25"', add
label define ma1994a_durres_lbl 26 `"26"', add
label define ma1994a_durres_lbl 27 `"27"', add
label define ma1994a_durres_lbl 28 `"28"', add
label define ma1994a_durres_lbl 29 `"29"', add
label define ma1994a_durres_lbl 30 `"30"', add
label define ma1994a_durres_lbl 31 `"31"', add
label define ma1994a_durres_lbl 32 `"32"', add
label define ma1994a_durres_lbl 33 `"33"', add
label define ma1994a_durres_lbl 34 `"34"', add
label define ma1994a_durres_lbl 35 `"35"', add
label define ma1994a_durres_lbl 36 `"36"', add
label define ma1994a_durres_lbl 37 `"37"', add
label define ma1994a_durres_lbl 38 `"38"', add
label define ma1994a_durres_lbl 39 `"39"', add
label define ma1994a_durres_lbl 40 `"40"', add
label define ma1994a_durres_lbl 41 `"41"', add
label define ma1994a_durres_lbl 42 `"42"', add
label define ma1994a_durres_lbl 43 `"43"', add
label define ma1994a_durres_lbl 44 `"44"', add
label define ma1994a_durres_lbl 45 `"45"', add
label define ma1994a_durres_lbl 46 `"46"', add
label define ma1994a_durres_lbl 47 `"47"', add
label define ma1994a_durres_lbl 48 `"48"', add
label define ma1994a_durres_lbl 49 `"49"', add
label define ma1994a_durres_lbl 50 `"50"', add
label define ma1994a_durres_lbl 51 `"51"', add
label define ma1994a_durres_lbl 52 `"52"', add
label define ma1994a_durres_lbl 53 `"53"', add
label define ma1994a_durres_lbl 54 `"54"', add
label define ma1994a_durres_lbl 55 `"55"', add
label define ma1994a_durres_lbl 56 `"56"', add
label define ma1994a_durres_lbl 57 `"57"', add
label define ma1994a_durres_lbl 58 `"58"', add
label define ma1994a_durres_lbl 59 `"59"', add
label define ma1994a_durres_lbl 60 `"60"', add
label define ma1994a_durres_lbl 61 `"61"', add
label define ma1994a_durres_lbl 62 `"62"', add
label define ma1994a_durres_lbl 63 `"63"', add
label define ma1994a_durres_lbl 64 `"64"', add
label define ma1994a_durres_lbl 65 `"65"', add
label define ma1994a_durres_lbl 66 `"66"', add
label define ma1994a_durres_lbl 67 `"67"', add
label define ma1994a_durres_lbl 68 `"68"', add
label define ma1994a_durres_lbl 69 `"69"', add
label define ma1994a_durres_lbl 70 `"70"', add
label define ma1994a_durres_lbl 71 `"71"', add
label define ma1994a_durres_lbl 72 `"72"', add
label define ma1994a_durres_lbl 73 `"73"', add
label define ma1994a_durres_lbl 74 `"74"', add
label define ma1994a_durres_lbl 75 `"75"', add
label define ma1994a_durres_lbl 76 `"76"', add
label define ma1994a_durres_lbl 77 `"77"', add
label define ma1994a_durres_lbl 78 `"78"', add
label define ma1994a_durres_lbl 79 `"79"', add
label define ma1994a_durres_lbl 80 `"80+"', add
label define ma1994a_durres_lbl 97 `"Same town/village"', add
label define ma1994a_durres_lbl 98 `"Unknown"', add
label define ma1994a_durres_lbl 99 `"NIU (not in universe)"', add
label values ma1994a_durres ma1994a_durres_lbl

label define ma1994a_lit_lbl 0 `"Illiterate"'
label define ma1994a_lit_lbl 1 `"Arabic only"', add
label define ma1994a_lit_lbl 2 `"Arabic and French"', add
label define ma1994a_lit_lbl 3 `"Arabic, French and another"', add
label define ma1994a_lit_lbl 4 `"Arabic and another (not French)"', add
label define ma1994a_lit_lbl 5 `"Other cases"', add
label define ma1994a_lit_lbl 9 `"NIU (not in the universe)"', add
label values ma1994a_lit ma1994a_lit_lbl

label define ma1994a_edlevel_lbl 00 `"None"'
label define ma1994a_edlevel_lbl 01 `"Preschool, not specified"', add
label define ma1994a_edlevel_lbl 02 `"Preschool, kindergarten"', add
label define ma1994a_edlevel_lbl 03 `"Preschool, Koranic"', add
label define ma1994a_edlevel_lbl 10 `"Basic education, first grade"', add
label define ma1994a_edlevel_lbl 11 `"Basic education, second grade"', add
label define ma1994a_edlevel_lbl 12 `"Basic education, third grade"', add
label define ma1994a_edlevel_lbl 13 `"Basic education, fourth grade"', add
label define ma1994a_edlevel_lbl 14 `"Basic education, fifth grade"', add
label define ma1994a_edlevel_lbl 15 `"Basic education, sixth grade"', add
label define ma1994a_edlevel_lbl 16 `"Basic education, seventh grade"', add
label define ma1994a_edlevel_lbl 17 `"Basic education, eighth grade"', add
label define ma1994a_edlevel_lbl 18 `"Basic education, ninth grade"', add
label define ma1994a_edlevel_lbl 21 `"Secondary, year 1"', add
label define ma1994a_edlevel_lbl 22 `"Secondary, year 2"', add
label define ma1994a_edlevel_lbl 23 `"Secondary, year 3"', add
label define ma1994a_edlevel_lbl 31 `"Higher education, year 1"', add
label define ma1994a_edlevel_lbl 32 `"Higher education, year 2"', add
label define ma1994a_edlevel_lbl 33 `"Higher education, year 3"', add
label define ma1994a_edlevel_lbl 34 `"Higher education, year 4"', add
label define ma1994a_edlevel_lbl 35 `"Higher education, year 5"', add
label define ma1994a_edlevel_lbl 36 `"Higher education, year 6"', add
label define ma1994a_edlevel_lbl 37 `"Higher education, year 7"', add
label define ma1994a_edlevel_lbl 99 `"Unknown"', add
label values ma1994a_edlevel ma1994a_edlevel_lbl

label define ma1994a_lang_lbl 1 `"Tachalhit"'
label define ma1994a_lang_lbl 2 `"Tamazight"', add
label define ma1994a_lang_lbl 3 `"Tarifite"', add
label define ma1994a_lang_lbl 4 `"Arabic"', add
label define ma1994a_lang_lbl 9 `"Unknown"', add
label values ma1994a_lang ma1994a_lang_lbl

}

** combine IPUMS data w my coded historical data
merge m:1 geo2alt_ma using "${clean}/MA_GIS_CONTROLS.FINAL.dta"

** generate a count variable for every individual in dataset
gen count=1
tab count

** NB: weights are same for all inviduals so need not be used for analysis
tab perwt

** Recode age variable
table age

* change 999 code to missing 
replace age=. if age==999
table age

*Constructing YOB Variable
gen YOB = 1994-age
label variable YOB "Estimated Year of Birth"
table YOB
* drop 855 individuals with no estimated age
drop if age==.

* Construct MOB Variable: did respondent report (and document) Month of Birth
table birthmo
gen MOB = 0
replace MOB = 1 if birthmo!=98
label variable MOB "Reported Month of Birth"
label define moblabel 0 "No Reported MoB" 1 "Reported MoB"
label values MOB moblabel
table MOB

* Construct a Text version of birth month variable
gen birthmonth = birthmo 
label variable birthmonth "Reported Month of Birth"
label define bmlabel  1  "January" 2 "February" 3 "March" 4 "April" 5 "May" 6 "June" 7 "July" 8 "August" 9 "September" 10 "October" 11 "November" 12 "December" 98 "missing"
label values birthmonth bmlabel

* Construct Birth Year Variable: did respondent report (and document) Year of Birth

gen BY = 0
replace BY = 1 if birthyr!=9999
table BY
label variable BY "Reported Birth Year"
label define yoblabel 0 "No Reported YoB" 1 "Reported YoB"
label values BY yoblabel

* NB highly correlated with MOB variable
cor BY MOB

* Generate Civil Registry Variable: did respondent report (and document) Civil Registration Status
table ma1994a_vitalreg
gen Registration=(ma1994a_vitalreg==1) if !missing(ma1994a_vitalreg)
replace Registration=. if ma1994a_vitalreg==8
table ma1994a_vitalreg
table Registration

* Generate Retroactive Registration Dummy: was respondent registered but did not report MOB
gen reg_retro=1 if Registration==1 & MOB==0
replace reg_retro=0 if Registration==0
replace reg_retro=. if MOB==1
table reg_retro

* Show Heaping: generate last reported digit of age
generate last_digit = mod(age,10)
table last_digit

* More refined measure of heaping
gen heaping=1 if last_digit==5  | last_digit==0
replace heaping=0 if last_digit==2 | last_digit==4 | last_digit==3 | last_digit==7 | last_digit==9 | last_digit==6 | last_digit==8
label define heapinglabel 0 "Reported Age, Non Heaped" 1 "Reported Age, Heaped" 
label values heaping heapinglabel
table heaping

*Create Even/Odd Indicator
gen age_even =1 if last_digit==2 | last_digit==4 | last_digit==0 | last_digit==6 | last_digit==8
replace age_even =0 if last_digit==3 | last_digit==5 | last_digit==7 | last_digit==9 | last_digit==1
label define evenlabel 0 "Reported Age, Odd" 1  "Reported Age, Even"
label values age_even evenlabel
table age_even

* Code French Literacy Variable: was respondent literate in French AND Arabic
table ma1994a_lit
gen French_Lit = (ma1994a_lit>1 & ma1994a_lit<4) if !missing(ma1994a_lit)
replace French_Lit=. if ma1994a_lit==9
label variable French_Lit "Literate in French and Arabic"
table French_Lit

* Code Arabic Literacy Variable: was respondent literate ONLY in Arabic
table ma1994a_lit
gen Arab_Lit = (ma1994a_lit==1) if !missing(ma1994a_lit)
replace Arab_Lit=. if ma1994a_lit==9
label variable Arab_Lit "Literate in Arabic Only"
table Arab_Lit

* Recode Schooling Variable: did respondent complete anything above traditional education/preschool
table ma1994a_edlevel
gen Schooling = (ma1994a_edlevel>=10)
replace Schooling=. if ma1994a_edlevel==99
label variable Schooling "Some Primary Schooling"
table Schooling

* Generate CM2 variable, last required level of schooling for analysis subset
gen CM2 = (ma1994a_edlevel>14)
replace CM2=. if ma1994a_edlevel==99
label variable CM2 "Completed Fifth Grade"
table CM2


** Show variation before and after 1963 law
** generate 1962 dummy

gen post_62 = (YOB>1962)
table post_62
label define post_62label 0 "Born before 1963" 1 "Born After 1963" 
label values post_62 post_62label

* Recode EDU Variable
table yrschool
gen EDU_YRS = yrschool if !missing(yrschool)
replace EDU_YRS=. if yrschool==98
label variable EDU_YRS "Years of Formal Education"
table EDU_YRS

* Recode Language Variable: Respondent indicated first spoken language is Arabic
table ma1994a_lang
gen Arabic = (ma1994a_lang==4) if !missing(ma1994a_lang)
label variable Arabic "First Language Arabic" 
table Arabic

* Recode Female Variable
table sex
gen Female = (sex==2) if !missing(sex)
label variable Female "Female" 
table Female

* Rural Housing variable
table ma1994a_dwelltyp
gen Rural = (ma1994a_dwelltyp==7) if !missing(ma1994a_dwelltyp)

* Rural Housing variable
gen Urban = (ma1994a_dwelltyp!=7) if !missing(ma1994a_dwelltyp)

* Show share of rural houses in contemporary Rabat
table Rural if geo2_ma==504010002

* Registered HoH variable: was Head of Household registered
table relate
gen HoH_REG= MOB==1 if relate==1
replace HoH_REG=. if relate!=1
table HoH_REG

* Dummy variable indicating if HoH is registered for all members of Household
bysort serial (relate): carryforward HoH_REG, gen(HoH_Registered)
table HoH_Registered

label variable cropland1910 "Estimated Cropland, 1910"
label variable popd_1910 "Estimated Population Density, 1910"
label variable municent_pop "Municipality/Center Total Population"
label variable municent_for "Municipality/Center Foreign Population"
label variable municent_for_share "Municipality/Town Foreign Population Share, 1950" 
label variable elev_mean  "Mean Elevation"  
label variable farms "Foreign Farms, Count"
label variable farms_wt "Foreign Farms, Count Weighted"
label variable FR_Maroc "Former French Protectorate"

* Recode LIT Variable: was respndent literate
table lit
gen LIT = (lit>1) if !missing(lit)
replace LIT=. if lit==0
label variable LIT "Literacy"
table LIT
table lit

** Create Additional Arr*FE interaction
gen reg_fe=YOB*geo1alt_ma

* Create 5 year bins to account for heaping, 5 years as standard in IPUMS, as well as Moroccan census in 2004, and in 2014 where invididuals ages over 25 i.e. born before 1990 are
* only recorded in five year increments
gen YOB_BIN_5= 1990 if age2==1
replace YOB_BIN_5= 1985 if age2==2
replace YOB_BIN_5= 1980 if age2==3
replace YOB_BIN_5= 1975 if age2==4
replace YOB_BIN_5= 1970 if age2==12
replace YOB_BIN_5= 1965 if age2==13
replace YOB_BIN_5= 1960 if age2==14
replace YOB_BIN_5= 1955 if age2==15
replace YOB_BIN_5= 1950 if age2==16
replace YOB_BIN_5= 1945 if age2==17
replace YOB_BIN_5= 1940 if age2==18
replace YOB_BIN_5= 1935 if age2==19
replace YOB_BIN_5= 1930 if age2==20
replace YOB_BIN_5= 1925 if age2==21
replace YOB_BIN_5= 1920 if age2==22
replace YOB_BIN_5= 1915 if age2==23

save "${clean}/who_counts_descriptives.dta", replace

clear

use "${clean}/who_counts_descriptives.dta"

*Make new .dta file without excluded groups: Provinces formerly administered by Spain, non-residents, non-citizens, those born abroad, subset to analysis cohorts *
** drop contemporary provinces that were not formerly part of the French protectorate and thereforce not subject to 1950 reform
table FR_Maroc
drop if FR_Maroc!=1

** drop non residents
table ma1994a_resident
drop if ma1994a_resident==2

** drop non citizens
table citizen
drop if citizen==4

** drop individuals born abroad
table nativity
drop if nativity==2

* subset to analysis cohorts
drop if YOB < 1945
drop if YOB > 1962

** Create Treated Variable for Registration
gen TREATED = (YOB>=1951) if !missing(YOB)
label define treatlabel 0 "Born Before 1951" 1 "Born After 1951"
label values TREATED treatlabel
table TREATED 

* DiD Variables

gen ANY_FOR=1 if municent_for_share > 0
replace ANY_FOR=0 if municent_for_share== 0
label define ANYFORlabel 0 "No Urban Foreigners" 1 "Some Urban Foreigners " 
label values ANY_FOR ANYFORlabel
table ANY_FOR
table ANY_FOR geo2_ma1994

* Create alternative did variable as share over 3.5% foreign, 1st quartile
summarize municent_for_share,d
gen FOR_MAX=1 if municent_for_share > .0360555 
replace FOR_MAX=0 if municent_for_share< .0360555 
label define MAXFORlabel 0 "Urban Foreigners" 1 "Some Urban Foreigners " 
label values FOR_MAX MAXFORlabel
table FOR_MAX

* DID Interactions and Controls 

* Create did binary, simple and max. mob outcome
gen did_ANY=TREATED*ANY_FOR
gen did_max=TREATED*FOR_MAX

* Create did MUNI binary simple and max. education outcome
gen did_edu_ANY=TREATED*ANY_FOR
gen did_edu_max=TREATED*FOR_MAX

* Create DiD farm, unweighted
gen did_farm=TREATED*farms
gen did_edu_farm=TREATED*farms

* Create DiD farm, weighted
gen did_farm_wt=TREATED*farms_wt
gen did_edu_farm_wt=TREATED*farms_wt

label variable did_ANY "Difference in Differences"
label variable did_edu_ANY "Difference in Differences"

label variable did_max "Difference in Differences, Alt"
label variable did_edu_max "Difference in Differences, Alt"

* Create Placebo Treated variables
gen TREATED46 = (YOB>=1946) if !missing(YOB)
label define treatlabel46 0 "Born Before 1946" 1 "Born After 1946"
label values TREATED46 treatlabel46
table TREATED46

gen TREATED47 = (YOB>=1947) if !missing(YOB)
label define treatlabel47 0 "Born Before 1947" 1 "Born After 1947"
label values TREATED47 treatlabel47
table TREATED47

gen TREATED48 = (YOB>=1948) if !missing(YOB)
label define treatlabel48 0 "Born Before 1948" 1 "Born After 1948"
label values TREATED48  treatlabel48
table TREATED48

gen TREATED49 = (YOB>=1949) if !missing(YOB)
label define treatlabel49 0 "Born Before 1949" 1 "Born After 1949"
label values TREATED49 treatlabel49
table TREATED49

gen TREATED50 = (YOB>=1950) if !missing(YOB)
label define treatlabel50 0 "Born Before 1950" 1 "Born After 1950"
label values TREATED50 treatlabel50
table TREATED50

** Placebo DiDs
gen did_ANY46=TREATED46*ANY_FOR
gen did_ANY47=TREATED47*ANY_FOR
gen did_ANY48=TREATED48*ANY_FOR
gen did_ANY49=TREATED49*ANY_FOR
gen did_ANY50=TREATED50*ANY_FOR

gen did_edu_ANY46=TREATED46*ANY_FOR
gen did_edu_ANY47=TREATED47*ANY_FOR
gen did_edu_ANY48=TREATED48*ANY_FOR
gen did_edu_ANY49=TREATED49*ANY_FOR
gen did_edu_ANY50=TREATED50*ANY_FOR

* Linear interactions with controls and DiD components: MOB

foreach v of varlist Arabic Female ec_total Coastal elev_mean cropland1910 popd_1910 {
gen `v'_itTREATED=`v'*TREATED
gen `v'_itANYFOR=`v'*ANY_FOR
gen `v'_itFORMAX=`v'*FOR_MAX
gen `v'_itFARM=`v'*farms
gen `v'_itFARM_WT=`v'*farms_wt
gen `v'_itTREATED46=`v'*TREATED46
gen `v'_itTREATED47=`v'*TREATED47
gen `v'_itTREATED48=`v'*TREATED48
gen `v'_itTREATED49=`v'*TREATED49
gen `v'_itTREATED50=`v'*TREATED50
}

* School Census measures from 1952 are correlated: use number of students and schools
cor n_schools52 n_students52
cor n_classes52 n_students52
cor n_classes52 n_schools52

* Linear interactions with controls and DiD components: CM2

foreach v of varlist Arabic Female n_schools52 n_classes52 n_students52 Coastal elev_mean cropland1910 popd_1910 {
gen `v'_itTREATEDEDU=`v'*TREATED
gen `v'_itANYFOREDU=`v'*ANY_FOR
gen `v'_itMAXFOREDU=`v'*FOR_MAX
gen `v'_itFARMEDU=`v'*farms
gen `v'_itFARM_WTEDU=`v'*farms_wt
gen `v'_itTREATED46EDU=`v'*TREATED46
gen `v'_itTREATED47EDU=`v'*TREATED47
gen `v'_itTREATED48EDU=`v'*TREATED48
gen `v'_itTREATED49EDU=`v'*TREATED49
gen `v'_itTREATED50EDU=`v'*TREATED50
}

save "${clean}/who_counts_analysis.dta", replace

** repeat process for mechanisms school and population census data **
clear 

use "${clean}/who_counts_mechanisms_raw.dta"

** Add Log variales **

egen type_factor = group(type)
gen students_male_log=log(students_male)
gen students_female_log=log(students_female)

** drop communes formerly colonized by spain **

drop if colonizer==2

save "${clean}/who_counts_mechanisms.dta"
